From 473c4d817b4dee655b444a60ce4b8d55f95fc95c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 30 Mar 2020 15:12:49 +1100 Subject: [PATCH] fix bug with accept/reject buttons on friend request #914 --- js/models/conversations.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 0029e8f14..48c6781df 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -247,9 +247,12 @@ async acceptFriendRequest() { const messages = await window.Signal.Data.getMessagesByConversation( this.id, - { limit: 1, MessageCollection: Whisper.MessageCollection } + { + limit: 1, + MessageCollection: Whisper.MessageCollection, + type: 'friend-request', + } ); - const lastMessageModel = messages.at(0); if (lastMessageModel) { lastMessageModel.acceptFriendRequest(); @@ -264,7 +267,11 @@ async declineFriendRequest() { const messages = await window.Signal.Data.getMessagesByConversation( this.id, - { limit: 1, MessageCollection: Whisper.MessageCollection } + { + limit: 1, + MessageCollection: Whisper.MessageCollection, + type: 'friend-request', + } ); const lastMessageModel = messages.at(0);