Philipp Hörist pushed to branch master at gajim / gajim
Commits:
6c69081d by Philipp Hörist at 2023-12-15T20:31:08+01:00
fix: OMEMO: Process events only once per account
- - - - -
1 changed file:
- gajim/common/modules/omemo.py
Changes:
=====================================
gajim/common/modules/omemo.py
=====================================
@@ -66,6 +66,7 @@
from gajim.common.events import MucAdded
from gajim.common.events import MucDiscoUpdate
from gajim.common.events import SignedIn
+from gajim.common.helpers import event_filter
from gajim.common.i18n import _
from gajim.common.modules.base import BaseModule
from gajim.common.modules.contacts import GroupchatContact
@@ -150,14 +151,17 @@ def __init__(self, client: types.Client) -> None:
self._omemo_groupchats: set[str] = set()
self._muc_temp_store: dict[bytes, str] = {}
+ @event_filter(['account'])
def _on_signed_in(self, _event: SignedIn) -> None:
self._log.info('Publish our bundle after sign in')
self.set_bundle()
self.request_devicelist()
+ @event_filter(['account'])
def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None:
self._check_if_omemo_capable(str(event.jid))
+ @event_filter(['account'])
def _on_muc_added(self, event: MucAdded) -> None:
client = app.get_client(event.account)
contact = client.get_module('Contacts').get_contact(event.jid)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/6c69081dd4b722c87b8a76956b61340dc26304ff
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/6c69081dd4b722c87b8a76956b61340dc26304ff
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]