Only store profile keys for group history if none is known yet

This commit is contained in:
AsamK 2024-06-06 09:37:53 +02:00
parent 10b9c264fd
commit 17596795c2

View file

@ -500,7 +500,10 @@ public class GroupHelper {
fromRevision = page.getPagingData().getNextPageRevision(); fromRevision = page.getPagingData().getNextPageRevision();
} }
newProfileKeys.forEach(account.getProfileStore()::storeProfileKey); newProfileKeys.entrySet()
.stream()
.filter(entry -> account.getProfileStore().getProfileKey(entry.getKey()) == null)
.forEach(entry -> account.getProfileStore().storeProfileKey(entry.getKey(), entry.getValue()));
} }
private GroupInfo getGroupForUpdating(GroupId groupId) throws GroupNotFoundException, NotAGroupMemberException { private GroupInfo getGroupForUpdating(GroupId groupId) throws GroupNotFoundException, NotAGroupMemberException {