Philipp Hörist pushed to branch master at gajim / gajim
Commits: 3e1fa2e9 by Philipp Hörist at 2023-05-09T20:03:31+02:00 new: Client: Add convenience method for checking own JID
- - - - -
1 changed file:
- gajim/common/client.py
Changes:
===================================== gajim/common/client.py ===================================== @@ -330,6 +330,10 @@ def _on_stanza_received(self, app.ged.raise_event(StanzaReceived(account=self._account, stanza=stanza))
+ def is_own_jid(self, jid: JID | str) -> bool: + jid = self.get_own_jid() + return jid.bare_match(jid) + def get_own_jid(self) -> JID: ''' Return the last full JID we received on a bind event.
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/3e1fa2e9055197acafa349d55359cf0af...