Merge pull request #1027 from Bilb/fix-accept-friend-request

fix bug with accept/reject buttons on friend request
pull/1028/head
Audric Ackermann 5 years ago committed by GitHub
commit c782cbb7bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save