Philipp Hörist pushed to branch storage at gajim / gajim


Commits:
2ab3fb23 by Philipp Hörist at 2023-07-16T13:16:19+02:00
Ignore call and filetransfer for export

- - - - -


1 changed file:

- gajim/gtk/history_export.py


Changes:

=====================================
gajim/gtk/history_export.py
=====================================
@@ -143,6 +143,10 @@ def _on_export(self) -> None:
             with open(file_path / 'history.txt', 'w', encoding='utf-8') as 
file:
                 file.write(f'History for {jid}\n\n')
                 for message in messages:
+                    if message.call is not None:
+                        continue
+                    if message.has_filetransfers:
+                        continue
                     file.write(self._get_export_line(message))
 
         self.show_page('success', Gtk.StackTransitionType.SLIDE_LEFT)
@@ -158,7 +162,6 @@ def _get_nickname(self, joined_data: 
DbConversationJoinedData) -> str:
         return _('You')
 
     def _get_export_line(self, joined_data: DbConversationJoinedData) -> str:
-        # TODO ignore call and jingle data
         name = self._get_nickname(joined_data)
         timestamp = time.strftime(
             '%Y-%m-%d %H:%M:%S', time.localtime(joined_data.timestamp))



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

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