Skip to content

Commit

Permalink
cannot delete for everyone when one cannot send or in self-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Feb 26, 2025
1 parent fc97daa commit fc87b28
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1299,11 +1299,15 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
}

var canDeleteForEveryone = true
for msgId in ids {
if !dcContext.getMessage(id: msgId).isFromCurrentSender {
canDeleteForEveryone = false
break
if dcChat.canSend && !dcChat.isSelfTalk {
for msgId in ids {
if !dcContext.getMessage(id: msgId).isFromCurrentSender {
canDeleteForEveryone = false
break
}
}
} else {
canDeleteForEveryone = false
}

let alert = UIAlertController(title: String.localized(stringID: "ask_delete_messages_simple", parameter: ids.count), message: nil, preferredStyle: .safeActionSheet)
Expand Down

0 comments on commit fc87b28

Please sign in to comment.