From c34f3da062c1fbb34041223535ef16b863790aea Mon Sep 17 00:00:00 2001
From: wurstsalat <mailtrash@posteo.de>
Date: Sat, 28 May 2022 23:09:55 +0200
Subject: [PATCH] fix: ChatControl: Don't update AV actions for PMs

Fixes: #10921
---
 gajim/gtk/controls/chat.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gajim/gtk/controls/chat.py b/gajim/gtk/controls/chat.py
index b811c7e804..c0045df932 100644
--- a/gajim/gtk/controls/chat.py
+++ b/gajim/gtk/controls/chat.py
@@ -197,12 +197,13 @@ def update_actions(self) -> None:
             online and self._client.get_module('Blocking').supported)
 
         # Jingle AV
-        self._get_action('start-voice-call-').set_enabled(
-            online and self.contact.supports_audio()
-            and sys.platform != 'win32')
-        self._get_action('start-video-call-').set_enabled(
-            online and self.contact.supports_video()
-            and sys.platform != 'win32')
+        if self.type.is_chat:
+            self._get_action('start-voice-call-').set_enabled(
+                online and self.contact.supports_audio()
+                and sys.platform != 'win32')
+            self._get_action('start-video-call-').set_enabled(
+                online and self.contact.supports_video()
+                and sys.platform != 'win32')
 
         # Send message
         has_text = self.msg_textview.has_text()
-- 
GitLab