From cca6464cc7e64d6f46a29874e4b7d01a7766aa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Sun, 26 Aug 2018 20:52:18 +0200 Subject: [PATCH] buffer: Don't print out our leave event if we're rejoining. --- matrix/buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index a98a888..e3ddae6 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -1224,7 +1224,10 @@ class RoomBuffer(object): break if leave_index: - timeline_events = info.timeline.events[leave_index:] + timeline_events = info.timeline.events[leave_index+1:] + # Handle our leave as a state event since we're not in the + # nicklist anymore but we're already printed out our leave + self.handle_state_event(info.timeline.events[leave_index]) else: timeline_events = info.timeline.events