update read receipt when message history is updated

This commit is contained in:
Laureηt 2023-10-19 16:34:27 +00:00
parent 5b5a18d73b
commit 10c7513add
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -137,6 +137,14 @@ class LLMClient(AsyncClient):
self.history.append(event)
logger.debug(f"Updated history: {self.history}")
# update read receipt
await self.room_read_markers(
room_id=self.room,
fully_read_event=event.event_id,
read_event=event.event_id,
)
logger.debug(f"Updated read receipt to event: {event.event_id}")
# ignore our own messages
if event.sender == self.user:
logger.debug("Ignoring our own message.")