diff options
author | Philipp Hörist <philipp@hoerist.com> | 2023-05-09 21:03:19 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2023-05-09 21:03:31 +0300 |
commit | 3e1fa2e9055197acafa349d55359cf0afa498c52 (patch) | |
tree | a2817bc8083f052afd3de8cb9a29c9e96f486c6a | |
parent | dcb304c5a7485733959f21866219ff7b03b1f7e3 (diff) |
new: Client: Add convenience method for checking own JID
-rw-r--r-- | gajim/common/client.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gajim/common/client.py b/gajim/common/client.py index 3a1cb2932..e4287f9c6 100644 --- a/gajim/common/client.py +++ b/gajim/common/client.py @@ -330,6 +330,10 @@ class Client(Observable): 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. |