From 462c61d38f3e2916233927c26a352856583c5a7a Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 2 Sep 2019 14:39:02 +1000 Subject: [PATCH] Fix message deletion --- Signal/src/Models/MessageActions.swift | 2 +- .../src/ViewControllers/ConversationView/ConversationViewItem.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/src/Models/MessageActions.swift b/Signal/src/Models/MessageActions.swift index f65defe0e..b190c05b7 100644 --- a/Signal/src/Models/MessageActions.swift +++ b/Signal/src/Models/MessageActions.swift @@ -42,7 +42,7 @@ struct MessageActionBuilder { static func deleteMessage(conversationViewItem: ConversationViewItem, delegate: MessageActionsDelegate) -> MenuAction { return MenuAction(image: #imageLiteral(resourceName: "ic_trash"), title: NSLocalizedString("MESSAGE_ACTION_DELETE_MESSAGE", comment: "Action sheet button title"), - subtitle: NSLocalizedString("MESSAGE_ACTION_DELETE_MESSAGE_SUBTITLE", comment: "Action sheet button subtitle"), + subtitle: nil, block: { (_) in conversationViewItem.deleteAction() }) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m index 329d38dc3..f4de057f7 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m @@ -1186,7 +1186,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) // Delete the message BOOL isSentByUser = (interationType == OWSInteractionType_OutgoingMessage); - [[LKGroupChatAPI deleteMessageWithID:message.isGroupChatMessage forGroup:LKGroupChatAPI.publicChatServerID onServer:LKGroupChatAPI.publicChatServer isSentByUser:isSentByUser].catch(^(NSError *error) { + [[LKGroupChatAPI deleteMessageWithID:message.groupChatMessageID forGroup:LKGroupChatAPI.publicChatServerID onServer:LKGroupChatAPI.publicChatServer isSentByUser:isSentByUser].catch(^(NSError *error) { // Roll back [self.interaction save]; }) retainUntilComplete];