Fix syncing of adding contact after removal
This commit is contained in:
parent
6ca86b6b99
commit
c531bf2ca1
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue