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:
authorwurstsalat <mailtrash@posteo.de>2023-06-15 14:39:16 +0300
committerwurstsalat <mailtrash@posteo.de>2023-06-15 17:09:21 +0300
commitf67043e178b9b4b2d57d6d190e1fbef13234241c (patch)
tree02d491655545f982b4df3d15250c2506d7802156
parent32045991d4e0dd2fbeab0deec026658c563a49aa (diff)
fix: Contacts: Fix supports_{audio,video} property
-rw-r--r--gajim/common/modules/contacts.py2
-rw-r--r--gajim/gtk/chat_stack.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/gajim/common/modules/contacts.py b/gajim/common/modules/contacts.py
index a63578db6..c92b798d4 100644
--- a/gajim/common/modules/contacts.py
+++ b/gajim/common/modules/contacts.py
@@ -370,12 +370,14 @@ class BareContact(CommonContact):
return any(resource.supports(requested_feature)
for resource in self.iter_resources())
+ @property
def supports_audio(self) -> bool:
if (self.supports(Namespace.JINGLE_ICE_UDP) and
app.is_installed('FARSTREAM')):
return self.supports(Namespace.JINGLE_RTP_AUDIO)
return False
+ @property
def supports_video(self) -> bool:
if (self.supports(Namespace.JINGLE_ICE_UDP) and
app.is_installed('FARSTREAM')):
diff --git a/gajim/gtk/chat_stack.py b/gajim/gtk/chat_stack.py
index 5b4f75875..b2a861643 100644
--- a/gajim/gtk/chat_stack.py
+++ b/gajim/gtk/chat_stack.py
@@ -511,10 +511,10 @@ class ChatStack(Gtk.Stack, EventHelper):
online = app.account_is_connected(account)
app.window.get_action('start-voice-call').set_enabled(
- online and contact.supports_audio() and
+ online and contact.supports_audio and
sys.platform != 'win32')
app.window.get_action('start-video-call').set_enabled(
- online and contact.supports_video() and
+ online and contact.supports_video and
sys.platform != 'win32')
app.window.get_action('quote').set_enabled(online)