Philipp Hörist pushed to branch storage at gajim / gajim
Commits:
796f0b98 by Philipp Hörist at 2023-07-09T18:59:01+02:00
Remove all messages on account deletion
- - - - -
2 changed files:
- gajim/common/application.py
- gajim/common/storage/archive/storage.py
Changes:
=====================================
gajim/common/application.py
=====================================
@@ -417,6 +417,7 @@ def remove_account(self, account: str) -> None:
passwords.delete_password(account)
app.settings.remove_account(account)
app.app.remove_account_actions(account)
+ app.storage.archive.remove_all_from_account(account)
def _on_signed_in(self, event: SignedIn) -> None:
client = app.get_client(event.account)
=====================================
gajim/common/storage/archive/storage.py
=====================================
@@ -896,6 +896,10 @@ def remove_all_history(self) -> None:
self._execute_multiple(statements)
log.info('Removed all chat history')
+ def remove_all_from_account(self, account: str) -> None:
+ self._con.execute('DELETE FROM account WHERE jid = ?', (account,))
+ self._commit()
+
def cleanup_chat_history(self) -> None:
'''
Remove messages from account where messages are older than max_age
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/796f0b9821747c70ed7dc0ceec336a69169c9025
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/796f0b9821747c70ed7dc0ceec336a69169c9025
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]