Skip to content

Commit

Permalink
Resend on new contact
Browse files Browse the repository at this point in the history
  • Loading branch information
cammellos committed Sep 29, 2021
1 parent abc1689 commit 181e494
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions protocol/messenger_contacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,15 @@ func (m *Messenger) saveContact(contact *Contact) error {

// Reregister only when data has changed
if shouldReregisterForPushNotifications {
// Reset last published time for ChatIdentity so new contact can receive data
contactCodeTopic := transport.ContactCodeTopic(&m.identity.PublicKey)
m.logger.Debug("contact state changed ResetWhenChatIdentityLastPublished")
err = m.persistence.ResetWhenChatIdentityLastPublished(contactCodeTopic)
if err != nil {
m.logger.Error("ResetWhenChatIdentityLastPublished error", zap.Error(err))
return err
}

return m.reregisterForPushNotifications()
}

Expand Down

0 comments on commit 181e494

Please sign in to comment.