buffer: Handle fully read account data events.
This commit is contained in:
parent
1fe0484b96
commit
eabaee6a1b
1 changed files with 8 additions and 1 deletions
|
@ -44,7 +44,8 @@ from nio import (
|
|||
MegolmEvent,
|
||||
Event,
|
||||
OlmTrustError,
|
||||
UnknownEvent
|
||||
UnknownEvent,
|
||||
FullyReadEvent,
|
||||
)
|
||||
|
||||
from . import globals as G
|
||||
|
@ -1645,6 +1646,12 @@ class RoomBuffer(object):
|
|||
for event in timeline_events:
|
||||
self.handle_timeline_event(event)
|
||||
|
||||
for event in info.account_data:
|
||||
if isinstance(event, FullyReadEvent):
|
||||
if event.event_id == self.last_event_id:
|
||||
W.buffer_set(self.weechat_buffer._ptr, "unread", "")
|
||||
W.buffer_set(self.weechat_buffer._ptr, "hotlist", "-1")
|
||||
|
||||
# We didn't handle all joined users, the room display name might still
|
||||
# be outdated because of that, update it now.
|
||||
if self.unhandled_users:
|
||||
|
|
Loading…
Add table
Reference in a new issue