Commit graph libervia-backend/libervia/backend/models/core.py
Author SHA1 Message Date
Goffi
e241075a34 core: Unseen message counter:
This patches add handling for unseen messages counter, and last message received. The
counters are retrieved from DB on startup, they updated in-memory. Frontend are expected
to have their own in-memory counter too, the backend one is used for re-sync (e.g.; on page
reload).

Bridge methods are added to retrieve the state, and indicate which message has been seen
last by user. A signal is sent on counter reset to all frontends can synchronise.

This is currently local only, but it should be compatible with a future XEP-0490 (Message
Displayed Synchronization) implementation.
2026-06-20 15:11:06 +02:00
Goffi
23cbd8ff9d memory (sqla), bridge: New history_last_messages_metadata_get method:
This method is used to retrieve last messages and their timestamps. It's useful on frontend
startup to display data on last discussions.
2026-05-25 17:52:26 +02:00
Goffi
68da01a043 Dates update. 2026-03-31 12:57:17 +02:00
Goffi
6396a086ab core (models): add new models for DiscoIdentity and JID:
`JIDType` `StrictJIDType` can be used when a Twisted JID is expected in a Pydantic model.
2024-09-06 17:40:32 +02:00
Goffi
53fdaa9d09 Reformatted code base using black. 2024-06-19 18:44:57 +02:00
Goffi
3c35dea8b1 plugin XEP-0424: message retraction update:
- follow specification update (with namespace bump)
- retract from history on message reception for group chat
- send bridge message
2023-11-30 13:23:53 +01:00
Goffi
c9c886480e models (core): separate MessageEditData from MessageEdition:
`MessageEditData` is used to carry a new `MessageData` when an edition has happened, while
`MessageEdition` is used to send changes to do for a new edition.
2023-11-28 17:37:02 +01:00
Goffi
5f826f0505 core: introduce Pydantic based models in libervia.backend.models.core 2023-11-22 14:31:05 +01:00