From 38cc0b1bc7b784d16119ab5c4f35cfee8bc4b469 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 2 Apr 2020 12:23:14 -0400 Subject: [PATCH] Ensure last event to delete is ours --- src/gui/Pages/Chat/Timeline/EventList.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index f1a0d3bf..4a47d53b 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -83,7 +83,8 @@ Rectangle { function findLastRemovableDelegate() { for (let i = 0; i < eventList.model.count && i <= 1000; i++) { const event = eventList.model.get(i) - if (eventList.canRedact(event)) return [event] + if (eventList.canRedact(event) && + event.sender_id === chat.userId) return [event] } return [] }