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);