matrix: Don't send out read markers with an empty event id.

This commit is contained in:
Damir Jelić 2019-01-16 21:21:50 +01:00
parent e39b6a82b1
commit 9644ae5b65

10
main.py
View file

@ -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