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


Commits:
ed0b5aa3 by wurstsalat at 2025-03-04T23:18:42+01:00
fix: History export: Skip ResourceContacts for export

Fixes #12208

- - - - -


1 changed file:

- gajim/gtk/history_export.py


Changes:

=====================================
gajim/gtk/history_export.py
=====================================
@@ -18,9 +18,7 @@
 from gajim.common import app
 from gajim.common import configpaths
 from gajim.common.i18n import _
-from gajim.common.modules.contacts import BareContact
-from gajim.common.modules.contacts import GroupchatContact
-from gajim.common.modules.contacts import GroupchatParticipant
+from gajim.common.modules.contacts import ResourceContact
 from gajim.common.storage.archive.const import ChatDirection
 from gajim.common.storage.archive.const import MessageType
 from gajim.common.storage.archive.models import Message
@@ -243,9 +241,9 @@ def _update_chat_dropdown(self) -> None:
         chats: dict[str, str] = {"": _("All Chats")}
         for jid in jids:
             contact = client.get_module("Contacts").get_contact(jid)
-            assert isinstance(
-                contact, BareContact | GroupchatContact | GroupchatParticipant
-            )
+            if isinstance(contact, ResourceContact):
+                continue
+
             chats[str(jid)] = f"{contact.name} ({jid})"
 
         self._chats_dropdown.set_data(chats)



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

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