matrix: Don't send out read markers with an empty event id.
This commit is contained in:
parent
e39b6a82b1
commit
9644ae5b65
1 changed files with 7 additions and 3 deletions
10
main.py
10
main.py
|
@ -490,9 +490,13 @@ def buffer_switch_cb(_, _signal, buffer_ptr):
|
|||
|
||||
if room_buffer.should_send_read_marker:
|
||||
event_id = room_buffer.last_event_id
|
||||
server.room_send_read_marker(
|
||||
room_buffer.room.room_id, event_id)
|
||||
room_buffer.last_read_event = event_id
|
||||
|
||||
# A buffer may not have any events, in that case no event id is
|
||||
# here returned
|
||||
if event_id:
|
||||
server.room_send_read_marker(
|
||||
room_buffer.room.room_id, event_id)
|
||||
room_buffer.last_read_event = event_id
|
||||
|
||||
if room_buffer.members_fetched:
|
||||
return W.WEECHAT_RC_OK
|
||||
|
|
Loading…
Reference in a new issue