Ensure last event to delete is ours

This commit is contained in:
miruka 2020-04-02 12:23:14 -04:00
parent 6d270029ad
commit 38cc0b1bc7

View File

@ -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 []
}