Mark contact as registered when receiving message

This commit is contained in:
Fedor Indutny
2021-04-29 14:24:55 -07:00
committed by GitHub
parent dfbbd16e50
commit 8ac2d8fcec

View File

@@ -3262,6 +3262,11 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
const conversationId = message.get('conversationId');
const GROUP_TYPES = window.textsecure.protobuf.GroupContext.Type;
const fromContact = this.getContact();
if (fromContact) {
fromContact.setRegistered();
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const conversation = window.ConversationController.get(conversationId)!;
return conversation.queueJob(async () => {