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:
authorlovetox <philipp@hoerist.com>2022-08-14 15:12:27 +0300
committerlovetox <philipp@hoerist.com>2022-08-14 15:12:27 +0300
commit8de0c5d29d04e163e46e57341d8a7110629d118b (patch)
tree3eaf41538dc577588dc81e6868bc5669ab382b96
parent587c3bb75727a1cc8701a116a8e4e6a4c409b4ce (diff)
new: Contacts: Add convenience method to access disco fields
-rw-r--r--gajim/common/modules/contacts.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gajim/common/modules/contacts.py b/gajim/common/modules/contacts.py
index 1314de948..2f20cd2d5 100644
--- a/gajim/common/modules/contacts.py
+++ b/gajim/common/modules/contacts.py
@@ -651,6 +651,11 @@ class GroupchatContact(CommonContact):
return False
return disco_info.is_irc
+ def get_config_value(self, field_name: str) -> Any:
+ disco_info = self.get_disco()
+ assert disco_info is not None
+ return disco_info.get_field_value(Namespace.MUC_INFO, field_name)
+
def add_resource(self, resource: str) -> GroupchatParticipant:
assert resource is not None
# Check if resource is not None because not the whole