fix bug with accept/reject buttons on friend request #914

pull/1027/head
Audric Ackermann 5 years ago
parent 77ef5de17e
commit 473c4d817b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

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