Display OMEMO decryption error to the user instead of dropping it silently
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
Activity
Filter activity
added 1 commit
- b6950a03 - Display OMEMO decryption error to the user instead of silently dropping the message
added 1 commit
- 609bfc69 - Display OMEMO decryption error to the user instead of silently dropping the message
added 1 commit
- 081ba89e - Display OMEMO decryption error to the user instead of silently dropping the message
mentioned in issue #445 (closed)
mentioned in issue #452 (closed)
@lovetox please review this patch.
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'
Please register or sign in to reply