Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0384.py @ 3797:cc653b2685f0
core (memory/sqla), plugin XEP-0359: always add `origin-id`, and store:
`origin-id` is now always added to messages, and it is stored to database in the new
column instead of `extra` when present.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 17 Jun 2022 14:15:23 +0200 |
parents | 11f7ca8afd15 |
children | 8289ac1b34f4 |
comparison
equal
deleted
inserted
replaced
3796:24c1c06c865b | 3797:cc653b2685f0 |
---|---|
1415 if timer is None: | 1415 if timer is None: |
1416 client._xep_0384_muc_cache_timer = reactor.callLater( | 1416 client._xep_0384_muc_cache_timer = reactor.callLater( |
1417 MUC_CACHE_TTL, self._expireMUCCache, client) | 1417 MUC_CACHE_TTL, self._expireMUCCache, client) |
1418 else: | 1418 else: |
1419 timer.reset(MUC_CACHE_TTL) | 1419 timer.reset(MUC_CACHE_TTL) |
1420 # we use origin-id when possible, to identifiy the message in a stable way | |
1421 if self._sid is not None: | |
1422 self._sid.addOriginId(message_elt, mess_data['uid']) | |
1423 | 1420 |
1424 encryption_data = yield defer.ensureDeferred(self.encryptMessage( | 1421 encryption_data = yield defer.ensureDeferred(self.encryptMessage( |
1425 client, to_jids, body, feedback_jid=feedback_jid)) | 1422 client, to_jids, body, feedback_jid=feedback_jid)) |
1426 | 1423 |
1427 encrypted_elt = message_elt.addElement((NS_OMEMO, 'encrypted')) | 1424 encrypted_elt = message_elt.addElement((NS_OMEMO, 'encrypted')) |