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
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
gajim
gajim-plugins
Commits
5f17bcac
Commit
5f17bcac
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
[omemo] Dont handle LMC differently
A patch in Gajim made that unnecessary
parent
86afb2ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!41
Improved error messages
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
omemo/omemoplugin.py
+3
-19
3 additions, 19 deletions
omemo/omemoplugin.py
with
3 additions
and
19 deletions
omemo/omemoplugin.py
+
3
−
19
View file @
5f17bcac
...
...
@@ -27,7 +27,7 @@ import shutil
import
nbxmpp
from
nbxmpp.simplexml
import
Node
from
nbxmpp
import
NS_CORRECT
,
NS_ADDRESS
from
nbxmpp
import
NS_ADDRESS
import
dialogs
from
common
import
caps_cache
,
gajim
,
ged
,
configpaths
...
...
@@ -624,20 +624,12 @@ class OmemoPlugin(GajimPlugin):
if
account
in
self
.
disabled_accounts
:
return
try
:
# If we send a correction msg, the stanza is saved
# in correction_msg
if
event
.
correction_msg
:
event
.
msg_iq
=
event
.
correction_msg
if
not
event
.
msg_iq
.
getTag
(
'
body
'
):
return
state
=
self
.
get_omemo_state
(
account
)
full_jid
=
str
(
event
.
msg_iq
.
getAttr
(
'
to
'
))
to_jid
=
gajim
.
get_jid_without_resource
(
full_jid
)
# Delete previous Message out of Correction Message Stanza
if
event
.
msg_iq
.
getTag
(
'
replace
'
,
namespace
=
NS_CORRECT
):
event
.
msg_iq
.
delChild
(
'
encrypted
'
,
attrs
=
{
'
xmlns
'
:
NS_OMEMO
})
plaintext
=
event
.
msg_iq
.
getBody
()
msg_dict
=
state
.
create_gc_msg
(
gajim
.
get_jid_from_account
(
account
),
...
...
@@ -668,12 +660,8 @@ class OmemoPlugin(GajimPlugin):
# Store Hint for MAM
store
=
Node
(
'
store
'
,
attrs
=
{
'
xmlns
'
:
NS_HINTS
})
event
.
msg_iq
.
addChild
(
node
=
store
)
if
event
.
correction_msg
:
event
.
correction_msg
=
event
.
msg_iq
event
.
msg_iq
=
None
self
.
print_msg_to_log
(
event
.
correction_msg
)
else
:
self
.
print_msg_to_log
(
event
.
msg_iq
)
self
.
print_msg_to_log
(
event
.
msg_iq
)
callback
(
event
)
except
Exception
as
e
:
...
...
@@ -705,10 +693,6 @@ class OmemoPlugin(GajimPlugin):
full_jid
=
str
(
event
.
msg_iq
.
getAttr
(
'
to
'
))
to_jid
=
gajim
.
get_jid_without_resource
(
full_jid
)
# Delete previous Message out of Correction Message Stanza
if
event
.
msg_iq
.
getTag
(
'
replace
'
,
namespace
=
NS_CORRECT
):
event
.
msg_iq
.
delChild
(
'
encrypted
'
,
attrs
=
{
'
xmlns
'
:
NS_OMEMO
})
plaintext
=
event
.
msg_iq
.
getBody
().
encode
(
'
utf8
'
)
msg_dict
=
state
.
create_msg
(
...
...
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