fix: don't save sender as contact for certain message types (#4052)

This commit is contained in:
Igor Sirotin 2023-09-20 17:26:04 +01:00 committed by GitHub
parent 4cab5b6106
commit a89dc020e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -3615,8 +3615,10 @@ func (m *Messenger) handleRetrievedMessages(chatWithMessages map[transport.Filte
continue
}
contact = c
messageState.AllContacts.Store(senderID, contact)
m.forgetContactInfoRequest(senderID)
if msg.Type != protobuf.ApplicationMetadataMessage_PUSH_NOTIFICATION_QUERY {
messageState.AllContacts.Store(senderID, contact)
m.forgetContactInfoRequest(senderID)
}
}
messageState.CurrentMessageState = &CurrentMessageState{
MessageID: messageID,