Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-05-09 21:03:19 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-05-09 21:03:31 +0300
commit3e1fa2e9055197acafa349d55359cf0afa498c52 (patch)
treea2817bc8083f052afd3de8cb9a29c9e96f486c6a
parentdcb304c5a7485733959f21866219ff7b03b1f7e3 (diff)
new: Client: Add convenience method for checking own JID
-rw-r--r--gajim/common/client.py4
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.