Skip to content
Snippets Groups Projects

Display OMEMO decryption error to the user instead of dropping it silently

Closed ValdikSS requested to merge ValdikSS/gajim-plugins:show_omemo_error into gajim_1.1
2 unresolved threads

If in Multiuser Conference with OMEMO encryption enabled users of this group send OMEMO-encrypted messages without encrypting it with your key, you won't get any visible in-chat notification for this message and won't know if they send anything at all.

This patch fixes this issue.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
317
313 318 if not plaintext:
314 319 msg.encrypted = 'drop'
315 return
320 if self.omemo.own_device_id not in msg_dict['keys']:
321 show_error = True
322 plaintext = 'OMEMO-encrypted message was not encrypted for this device, can\'t decrypt'
323 else:
324 return
316 325
317 326 msg.msgtxt = plaintext
318 327 # Gajim bug: there must be a body or the message
319 328 # gets dropped from history
320 msg.stanza.setBody(plaintext)
329 if not show_error:
330 msg.stanza.setBody(plaintext)
  • 310 313 get_jid_without_resource(from_jid)
    311 314 plaintext = self.omemo.decrypt_msg(msg_dict)
    312 315
    316 show_error = False
    317
    313 318 if not plaintext:
    314 319 msg.encrypted = 'drop'
    315 return
    320 if self.omemo.own_device_id not in msg_dict['keys']:
    321 show_error = True
    322 plaintext = 'OMEMO-encrypted message was not encrypted for this device, can\'t decrypt'
  • In Gajim 1.2 the plugin should not drop messages silently

  • Please register or sign in to reply
    Loading