Allow profile pictures from contacts

This commit is contained in:
Andrea Maria Piana 2021-10-12 12:18:15 +01:00
parent cf11713d9c
commit 23308d7e8c
3 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
0.89.10
0.89.11

View File

@ -1359,7 +1359,10 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
// If we don't want to view profile images from anyone, don't process identity images.
// We don't want to store the profile images of other users, even if we don't display images.
if viewFromNoOne {
inOurContacts, ok := m.allContacts.Load(state.CurrentMessageState.Contact.ID)
isContact := ok && inOurContacts.Added
if viewFromNoOne && !isContact {
return nil
}

View File

@ -512,7 +512,8 @@ func resultExpectedVS(vs accounts.ProfilePicturesVisibilityType, bc bool) (bool,
case accounts.ProfilePicturesVisibilityEveryone:
return true, nil
case accounts.ProfilePicturesVisibilityNone:
return false, nil
// If we are contacts, we save the image regardless
return bc, nil
default:
return false, errors.New("unknown ProfilePicturesVisibilityType")
}