Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evert Mouw
gajim-plugins
Commits
dc143bd1
Commit
dc143bd1
authored
8 years ago
by
Bahtiar Gadimov
Browse files
Options
Downloads
Patches
Plain Diff
Fix some formatting
parent
ea299fb4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
omemo/__init__.py
+8
-6
8 additions, 6 deletions
omemo/__init__.py
with
8 additions
and
6 deletions
omemo/__init__.py
+
8
−
6
View file @
dc143bd1
...
...
@@ -22,6 +22,7 @@ import logging
import
os
import
sqlite3
# pylint: disable=import-error
from
common
import
caps_cache
,
gajim
,
ged
from
common.pep
import
SUPPORTED_PERSONAL_USER_EVENTS
from
plugins
import
GajimPlugin
...
...
@@ -33,6 +34,7 @@ from .xmpp import (
DeviceListAnnouncement
,
DevicelistPEP
,
OmemoMessage
,
successful
,
unpack_device_bundle
,
unpack_device_list_update
,
unpack_message
)
iq_ids_to_callbacks
=
{}
AXOLOTL_MISSING
=
'
Please install python-axolotl.
'
...
...
@@ -49,6 +51,7 @@ DB_DIR = gajim.gajimpaths.data_root
class
OmemoPlugin
(
GajimPlugin
):
# pylint: disable=no-init
omemo_states
=
{}
...
...
@@ -69,8 +72,7 @@ class OmemoPlugin(GajimPlugin):
(
ged
.
PRECORE
,
self
.
handle_outgoing_msgs
),
}
self
.
config_dialog
=
None
self
.
gui_extension_points
=
{
'
chat_control
'
:
(
self
.
connect_ui
,
None
)}
self
.
gui_extension_points
=
{
'
chat_control
'
:
(
self
.
connect_ui
,
None
)}
SUPPORTED_PERSONAL_USER_EVENTS
.
append
(
DevicelistPEP
)
@log_calls
(
'
OmemoPlugin
'
)
...
...
@@ -307,8 +309,8 @@ class OmemoPlugin(GajimPlugin):
device_id : int
The device_id for which we are missing an axolotl session
"""
log
.
debug
(
account_name
+
'
→ Fetch bundle device
'
+
str
(
device_id
)
+
'
#
'
+
jid
)
log
.
debug
(
account_name
+
'
→ Fetch bundle device
'
+
str
(
device_id
)
+
'
#
'
+
jid
)
iq
=
BundleInformationQuery
(
jid
,
device_id
)
iq_id
=
str
(
iq
.
getAttr
(
'
id
'
))
iq_ids_to_callbacks
[
iq_id
]
=
\
...
...
@@ -455,8 +457,8 @@ class OmemoPlugin(GajimPlugin):
if
not
state
.
encryption
.
is_active
(
to_jid
):
return
False
try
:
msg_dict
=
state
.
create_msg
(
gajim
.
get_jid_from_account
(
account
),
to_jid
,
plaintext
)
msg_dict
=
state
.
create_msg
(
gajim
.
get_jid_from_account
(
account
),
to_jid
,
plaintext
)
if
not
msg_dict
:
return
True
encrypted_node
=
OmemoMessage
(
msg_dict
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment