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

View file

@ -490,6 +490,10 @@ def buffer_switch_cb(_, _signal, buffer_ptr):
if room_buffer.should_send_read_marker: if room_buffer.should_send_read_marker:
event_id = room_buffer.last_event_id event_id = room_buffer.last_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( server.room_send_read_marker(
room_buffer.room.room_id, event_id) room_buffer.room.room_id, event_id)
room_buffer.last_read_event = event_id room_buffer.last_read_event = event_id