Daniel Brötzmann pushed to branch server-shutdown-message-account at gajim / 
gajim


Commits:
552a7e9c by wurstsalat at 2025-06-21T10:32:34+02:00
imprv: Show account for server shutdown notification

- - - - -


1 changed file:

- gajim/common/client.py


Changes:

=====================================
gajim/common/client.py
=====================================
@@ -278,12 +278,21 @@ def _on_disconnected(self,
                                                  'resource',
                                                  'gajim.$rand')
             if error == 'system-shutdown':
+                account_label = app.settings.get_account_setting(
+                    self._account, "account_label"
+                )
+                account_text = _("Account: %s") % account_label
+                shutdown_text = text or _("The server was shut down.")
+
                 app.ged.raise_event(
-                    Notification(context_id="",
-                                 account=self._account,
-                                 type='server-shutdown',
-                                 title=_('Server Shutdown'),
-                                 text=text or _('The server was shut down.')))
+                    Notification(
+                        context_id="",
+                        account=self._account,
+                        type="server-shutdown",
+                        title=_("Server Shutdown"),
+                        text=f"{shutdown_text}\n{account_text}",
+                    )
+                )
 
         elif domain == StreamError.SASL:
             self._reconnect = False



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

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

Reply via email to