Fix case where user doesn't accept friend request automatically after deleting the conversation.

pull/45/head
Mikunj 6 years ago
parent aed740ea3e
commit 47d5b9bda4

@ -1574,7 +1574,7 @@ NS_ASSUME_NONNULL_BEGIN
// TODO: We'll need to fix this up if we ever start using Sync messages // TODO: We'll need to fix this up if we ever start using Sync messages
// Currently it'll use `envelope.source` but with sync messages we need to use the message sender id // Currently it'll use `envelope.source` but with sync messages we need to use the message sender id
TSContactThread *thread = [TSContactThread getOrCreateThreadWithContactId:envelope.source transaction:transaction]; TSContactThread *thread = [TSContactThread getOrCreateThreadWithContactId:envelope.source transaction:transaction];
if (thread.isContactFriend || thread.friendRequestStatus == LKThreadFriendRequestStatusNone) return; if (thread.isContactFriend) return;
// Become happy friends and go on great adventures // Become happy friends and go on great adventures
[thread saveFriendRequestStatus:LKThreadFriendRequestStatusFriends withTransaction:transaction]; [thread saveFriendRequestStatus:LKThreadFriendRequestStatusFriends withTransaction:transaction];

Loading…
Cancel
Save