Allow users who have disabled Contacts permission to hide system contacts.

This commit is contained in:
Alex Hart
2024-05-03 11:22:08 -03:00
parent 36c91a95e2
commit 70d74e0bb1
2 changed files with 2 additions and 8 deletions

View File

@@ -724,7 +724,7 @@ public class GroupsV2StateProcessor {
ApplicationDependencies.getJobManager().add(new LeaveGroupV2Job(groupId));
//noinspection UnnecessaryReturnStatement
return;
} else if (addedBy.isSystemContact() || addedBy.isProfileSharing()) {
} else if ((addedBy.isSystemContact() || addedBy.isProfileSharing()) && !addedBy.isHidden()) {
Log.i(TAG, "Group 'adder' is trusted. contact: " + addedBy.isSystemContact() + ", profileSharing: " + addedBy.isProfileSharing());
Log.i(TAG, "Added to a group and auto-enabling profile sharing");
recipientTable.setProfileSharing(Recipient.externalGroupExact(groupId).getId(), true);