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:
authorDaniel Brötzmann <mailtrash@posteo.de>2022-07-29 12:28:05 +0300
committerlovetox <philipp@hoerist.com>2022-08-06 00:10:54 +0300
commitf56ba9208a22f878b04e590fca24277cab347591 (patch)
tree8aa1f5f1def8e4319f3105d400d995354d8e8e89
parent513333cf5bbecb3ccd1fc2b9096213c73ecc43ec (diff)
refactor: Contacts: Add is_irc()
-rw-r--r--gajim/common/modules/contacts.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gajim/common/modules/contacts.py b/gajim/common/modules/contacts.py
index f48bb73d7..a492c7dcc 100644
--- a/gajim/common/modules/contacts.py
+++ b/gajim/common/modules/contacts.py
@@ -584,6 +584,13 @@ class GroupchatContact(CommonContact):
def is_groupchat(self) -> bool:
return True
+ @property
+ def is_irc(self) -> bool:
+ disco_info = self.get_disco()
+ if disco_info is None:
+ return False
+ return disco_info.is_irc
+
def add_resource(self, resource: str) -> GroupchatParticipant:
assert resource is not None
# Check if resource is not None because not the whole