Store read receipts in event model items

This commit is contained in:
miruka
2020-09-05 16:47:34 -04:00
parent d51d266642
commit a9c316fcf5
3 changed files with 85 additions and 25 deletions

View File

@@ -242,9 +242,7 @@ class Member(ModelItem):
power_level: int = 0
invited: bool = False
profile_updated: datetime = ZERO_DATE
last_read_event: str = ""
last_read_at: datetime = ZERO_DATE
presence: Presence.State = Presence.State.offline
currently_active: bool = False
@@ -332,6 +330,9 @@ class Event(ModelItem):
redacter_id: str = ""
redacter_name: str = ""
# {user_id: server_timestamp} - QML can't parse dates from JSONified dicts
last_read_by: Dict[str, int] = field(default_factory=dict)
is_local_echo: bool = False
source: Optional[nio.Event] = None