Mercurial > libervia-backend
comparison libervia/backend/plugins/plugin_xep_0424.py @ 4379:79d463e3fdeb
core (types): Renamed `libervia.backend.core.core_types.MessageData` to `MessageDataLegacy`:
There are 2 concurrent models, this one is an historical legacy. The type to use the one
from `libervia.backend.models.core`, and it will progressively be used everywhere and
fully based on Pydantic.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jul 2025 12:28:00 +0200 |
parents | 7eda7cb8a15c |
children | 3c97717fd662 |
comparison
equal
deleted
inserted
replaced
4378:930a4ea7ab6f | 4379:79d463e3fdeb |
---|---|
25 from wokkel import disco | 25 from wokkel import disco |
26 from zope.interface import implementer | 26 from zope.interface import implementer |
27 | 27 |
28 from libervia.backend.core import exceptions | 28 from libervia.backend.core import exceptions |
29 from libervia.backend.core.constants import Const as C | 29 from libervia.backend.core.constants import Const as C |
30 from libervia.backend.core.core_types import MessageData, SatXMPPEntity | 30 from libervia.backend.core.core_types import MessageDataLegacy, SatXMPPEntity |
31 from libervia.backend.core.i18n import D_, _ | 31 from libervia.backend.core.i18n import D_, _ |
32 from libervia.backend.core.log import getLogger | 32 from libervia.backend.core.log import getLogger |
33 from libervia.backend.memory.sqla_mapping import History | 33 from libervia.backend.memory.sqla_mapping import History |
34 from libervia.backend.tools.common import data_format | 34 from libervia.backend.tools.common import data_format |
35 | 35 |
208 del history.extra["editions"] | 208 del history.extra["editions"] |
209 if "attachments" in history.extra: | 209 if "attachments" in history.extra: |
210 del history.extra["attachments"] | 210 del history.extra["attachments"] |
211 await self.host.memory.storage.add(history) | 211 await self.host.memory.storage.add(history) |
212 | 212 |
213 retract_data = MessageData(history.serialise()) | 213 retract_data = MessageDataLegacy(history.serialise()) |
214 self.host.bridge.message_update( | 214 self.host.bridge.message_update( |
215 history.uid, | 215 history.uid, |
216 C.MESS_UPDATE_RETRACT, | 216 C.MESS_UPDATE_RETRACT, |
217 data_format.serialise(retract_data), | 217 data_format.serialise(retract_data), |
218 client.profile, | 218 client.profile, |