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


Commits:
bedd7dc2 by wurstsalat at 2022-04-23T08:53:14+02:00
fix: AddContact: Don't set name twice for type gateway

- - - - -


1 changed file:

- gajim/gtk/add_contact.py


Changes:

=====================================
gajim/gtk/add_contact.py
=====================================
@@ -120,8 +120,7 @@ def _on_button_clicked(self,
                 client.get_module('Presence').subscribe(
                     self._result.jid,
                     name=self._result.gateway_name,
-                    auto_auth=True,
-                    name=self._nick)
+                    auto_auth=True)
             app.window.show_account_page(account)
             self.destroy()
             return
@@ -427,7 +426,7 @@ def prepare(self, account: str, result: DiscoInfo) -> None:
                 icon_name = 'gajim-agent-irc'
             self._ui.gateway_image.set_from_icon_name(
                 icon_name, Gtk.IconSize.DIALOG)
-            gateway_name = result.gateway_name or self._result.jid
+            gateway_name = result.gateway_name or str(self._result.jid)
             if not result.gateway_type:
                 self._ui.gateway_label.set_text(gateway_name)
             else:
@@ -439,11 +438,11 @@ def prepare(self, account: str, result: DiscoInfo) -> 
None:
             for identity in result.identities:
                 if identity.type == 'sms':
                     icon_name = 'gajim-agent-sms'
-                    identity_name = identity.name or self._result.jid
+                    identity_name = identity.name or str(self._result.jid)
                     identity_type = identity.type
                 if identity.type == 'irc':
                     icon_name = 'gajim-agent-irc'
-                    identity_name = identity.name or self._result.jid
+                    identity_name = identity.name or str(self._result.jid)
                     identity_type = identity.type
             self._ui.gateway_image.set_from_icon_name(
                 icon_name, Gtk.IconSize.DIALOG)



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

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/bedd7dc2f0a3560b274f50c90dc421078a7b1ccc
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