diff options
Diffstat (limited to 'gajim/common/storage/archive.py')
-rw-r--r-- | gajim/common/storage/archive.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gajim/common/storage/archive.py b/gajim/common/storage/archive.py index 3e52c3a4f..219c523dd 100644 --- a/gajim/common/storage/archive.py +++ b/gajim/common/storage/archive.py @@ -38,6 +38,7 @@ from collections.abc import KeysView from nbxmpp import JID from nbxmpp.structs import CommonError from nbxmpp.structs import MessageProperties +from nbxmpp.structs import Reactions as ReactionStruct from gajim.common import app from gajim.common import configpaths @@ -1311,6 +1312,35 @@ class MessageArchiveStorage(SqliteStorage): self._delayed_commit() @timeit + def update_reactions(self, + account: str, + jid: JID, + occupant_id: str, + timestamp: float, + reactions: ReactionStruct + ) -> None: + + # TODO: + # get message by account, jid, message_id; + # get reactions column content, parse it; + # update content, store it + # message_id = reactions.id + # emojis = reactions.emojis + + # Possible structure + # test = { + # '🤘️': [ + # { + # 'jid': 'test@example.net', + # 'occupant_id': 'asda-sdas-asda-asdf', + # 'timestamp': 123456678.123145, + # }, + # ], + # } + + pass + + @timeit def get_archive_infos(self, jid: str) -> LastArchiveMessageRow | None: ''' Get the archive infos |