Philipp Hörist pushed to branch master at gajim / gajim
Commits:
bee643ed by Philipp Hörist at 2026-01-20T21:23:08+01:00
fix: AddContact: Fix error making it unable to add new contact
Fixes #12597
- - - - -
1 changed file:
- gajim/gtk/add_contact.py
Changes:
=====================================
gajim/gtk/add_contact.py
=====================================
@@ -114,9 +114,10 @@ def _on_button_clicked(self, _assistant: Assistant,
button_name: str) -> None:
return
if button_name == "add":
- assert isinstance(self._result, DiscoInfo)
- assert self._result.jid is not None
+ assert isinstance(self._result, DiscoInfo | StanzaError)
+ assert isinstance(self._result.jid, JID)
client = app.get_client(account)
+
if page == "contact":
contact_page = self.get_page("contact")
data = contact_page.get_subscription_data()
@@ -127,10 +128,16 @@ def _on_button_clicked(self, _assistant: Assistant,
button_name: str) -> None:
auto_auth=data["auto_auth"],
name=self._nick,
)
- else:
+
+ elif page == "gateway":
+ assert isinstance(self._result, DiscoInfo)
client.get_module("Presence").subscribe(
self._result.jid, name=self._result.gateway_name,
auto_auth=True
)
+
+ else:
+ raise ValueError("No handler for page: %s" % page)
+
app.window.add_chat(account, self._result.jid, "chat", select=True)
self.close()
return
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/bee643ed68cfb9d2424c30ea51115457f85873e0
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/bee643ed68cfb9d2424c30ea51115457f85873e0
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]