Philipp Hörist pushed to branch master at gajim / gajim
Commits:
e6ca2152 by Philipp Hörist at 2024-05-21T21:33:21+02:00
refactor: Moderation: Adapt to nbxmpp changes
The stamp attribute is now a datetime
- - - - -
1 changed file:
- gajim/common/modules/moderations.py
Changes:
=====================================
gajim/common/modules/moderations.py
=====================================
@@ -124,9 +124,6 @@ def _insert_moderation_message(
remote_jid = properties.remote_jid
assert remote_jid is not None
- timestamp = dt.datetime.fromtimestamp(
- properties.moderation.stamp, dt.timezone.utc)
-
occupant_data = None
if moderator_occupant_id is not None:
occupant_data = mod.Occupant(
@@ -134,7 +131,7 @@ def _insert_moderation_message(
remote_jid_=remote_jid,
id=moderator_occupant_id,
nickname=moderator_nickname,
- updated_at=timestamp,
+ updated_at=properties.moderation.stamp,
)
moderation_data = mod.Moderation(
@@ -144,7 +141,7 @@ def _insert_moderation_message(
stanza_id=properties.moderation.stanza_id,
by=properties.moderation.by,
reason=properties.moderation.reason,
- timestamp=timestamp,
+ timestamp=properties.moderation.stamp,
)
pk = app.storage.archive.insert_row(
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e6ca21529eb60c843d057dfe180802c6169c611c
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e6ca21529eb60c843d057dfe180802c6169c611c
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]