Review changes

This commit is contained in:
Beaudan 2018-11-28 13:16:50 +11:00
parent 35c89ea4d9
commit fa63ce5ade
3 changed files with 4 additions and 5 deletions

View file

@ -1094,7 +1094,7 @@
);
const options = this.getSendOptions();
options.messageType = message.attributes.type;
options.messageType = message.get('type');
// Add the message sending on another queue so that our UI doesn't get blocked
this.queueMessageSend(async () =>

View file

@ -164,7 +164,7 @@
color: this.model.getColor(),
avatarPath: this.model.getAvatarPath(),
isVerified: this.model.isVerified(),
isKeysPending: this.model.isFriend() === false,
isKeysPending: !this.model.isFriend(),
isMe: this.model.isMe(),
isBlocked: this.model.isBlocked(),
isGroup: !this.model.isPrivate(),

View file

@ -987,6 +987,8 @@ MessageReceiver.prototype.extend({
}
if (envelope.type === textsecure.protobuf.Envelope.Type.FRIEND_REQUEST) {
conversation.onFriendRequestReceived();
} else {
conversation.onFriendRequestAccepted();
}
if (content.preKeyBundleMessage) {
@ -1010,9 +1012,6 @@ MessageReceiver.prototype.extend({
return this.handleReceiptMessage(envelope, content.receiptMessage);
this.removeFromCache(envelope);
// TODO: The empty friend request response could get lost
// Need to trigger this event whenever a message is received in the pending state
conversation.onFriendRequestAccepted();
return null;
},
handleCallMessage(envelope) {