Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
2cc53297 by wurstsalat at 2022-01-11T11:38:14+01:00
ChatControl: Fix using real jid for adding PM contact

- - - - -


1 changed file:

- gajim/gtk/controls/chat.py


Changes:

=====================================
gajim/gtk/controls/chat.py
=====================================
@@ -286,9 +286,14 @@ def delegate_action(self, action: str) -> int:
 
         return Gdk.EVENT_PROPAGATE
 
-    def _on_add_to_roster(self, _action, _param):
-        open_window('AddContact', account=self.account,
-                    jid=self.contact.jid)
+    def _on_add_to_roster(self,
+                          _action: Gio.SimpleAction,
+                          _param: Optional[GLib.Variant]
+                          ) -> None:
+        jid = self.contact.jid
+        if self.type.is_privatechat and self.contact.real_jid is not None:
+            jid = self.contact.real_jid
+        open_window('AddContact', account=self.account, jid=jid)
 
     def _on_block_contact(self, _action, _param):
         app.window.block_contact(self.account, self.contact.jid)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2cc532976506b242a8c57703aac1b0b51b15e5af

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/2cc532976506b242a8c57703aac1b0b51b15e5af
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to