From a353b1c074250c455d9a002e21002b4decd0a9bc Mon Sep 17 00:00:00 2001 From: Ivan Sein Date: Mon, 4 Apr 2022 11:06:23 +0200 Subject: [PATCH] Handle "reaction_deleted". Signed-off-by: Ivan Sein --- NextcloudTalk/NCChatController.m | 5 +++-- NextcloudTalk/NCChatViewController.m | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NextcloudTalk/NCChatController.m b/NextcloudTalk/NCChatController.m index b693ecdd..1992037d 100644 --- a/NextcloudTalk/NCChatController.m +++ b/NextcloudTalk/NCChatController.m @@ -376,7 +376,7 @@ NSString * const NCChatControllerDidReceiveCallEndedMessageNotification userInfo:userInfo]; } // Notify if "deleted messages" have been received - if ([message.systemMessage isEqualToString:@"message_deleted"] || [message.systemMessage isEqualToString:@"reaction"] || [message.systemMessage isEqualToString:@"reaction_revoked"]) { + if ([message.systemMessage isEqualToString:@"message_deleted"] || [message.systemMessage isEqualToString:@"reaction"] || [message.systemMessage isEqualToString:@"reaction_revoked"] || [message.systemMessage isEqualToString:@"reaction_deleted"]) { [userInfo setObject:message forKey:@"updateMessage"]; [[NSNotificationCenter defaultCenter] postNotificationName:NCChatControllerDidReceiveUpdateMessageNotification object:self @@ -627,7 +627,8 @@ NSString * const NCChatControllerDidReceiveCallEndedMessageNotification // Notify if an "update messages" have been received if ([message.systemMessage isEqualToString:@"message_deleted"] || [message.systemMessage isEqualToString:@"reaction"] || - [message.systemMessage isEqualToString:@"reaction_revoked"]) { + [message.systemMessage isEqualToString:@"reaction_revoked"] || + [message.systemMessage isEqualToString:@"reaction_deleted"]) { [userInfo setObject:message forKey:@"updateMessage"]; [[NSNotificationCenter defaultCenter] postNotificationName:NCChatControllerDidReceiveUpdateMessageNotification object:self diff --git a/NextcloudTalk/NCChatViewController.m b/NextcloudTalk/NCChatViewController.m index 247e766b..ba09ce95 100644 --- a/NextcloudTalk/NCChatViewController.m +++ b/NextcloudTalk/NCChatViewController.m @@ -3043,7 +3043,8 @@ NSString * const NCChatViewControllerTalkToUserNotification = @"NCChatViewContro if (message.isSystemMessage) { if ([message.systemMessage isEqualToString:@"message_deleted"] || [message.systemMessage isEqualToString:@"reaction"] || - [message.systemMessage isEqualToString:@"reaction_revoked"]) { + [message.systemMessage isEqualToString:@"reaction_revoked"] || + [message.systemMessage isEqualToString:@"reaction_deleted"]) { return (SystemMessageTableViewCell *)[self.tableView dequeueReusableCellWithIdentifier:InvisibleSystemMessageCellIdentifier]; } SystemMessageTableViewCell *systemCell = (SystemMessageTableViewCell *)[self.tableView dequeueReusableCellWithIdentifier:SystemMessageCellIdentifier]; @@ -3135,7 +3136,8 @@ NSString * const NCChatViewControllerTalkToUserNotification = @"NCChatViewContro if (message.message.length == 0 || [message.systemMessage isEqualToString:@"message_deleted"] || [message.systemMessage isEqualToString:@"reaction"] || - [message.systemMessage isEqualToString:@"reaction_revoked"]) { + [message.systemMessage isEqualToString:@"reaction_revoked"] || + [message.systemMessage isEqualToString:@"reaction_deleted"]) { return 0.0; }