Fix syncing of adding contact after removal

This commit is contained in:
Roman Volosovskyi 2022-04-25 11:02:49 +02:00
parent 6ca86b6b99
commit c531bf2ca1
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
3 changed files with 7 additions and 2 deletions

View File

@ -1 +1 @@
0.98.3
0.98.4

View File

@ -117,6 +117,11 @@ func (c *Contact) Remove() {
c.Removed = true
}
func (c *Contact) Add() {
c.Added = true
c.Removed = false
}
func buildContactFromPkString(pkString string) (*Contact, error) {
publicKeyBytes, err := types.DecodeHex(pkString)
if err != nil {

View File

@ -84,7 +84,7 @@ func (m *Messenger) AddContact(ctx context.Context, request *requests.AddContact
}
if !contact.Added {
contact.Added = true
contact.Add()
}
contact.LastUpdatedLocally = m.getTimesource().GetCurrentTime()