- final var group = account.getGroupStore().getGroup(connection, groupIdV1);
- group.setBlocked(groupV1Record.isBlocked());
- account.getGroupStore().updateGroup(connection, group);
- account.getGroupStore()
- .storeStorageRecord(connection,
- group.getGroupId(),
- groupV1Record.getId(),
- groupV1Record.toProto().encode());
+ final var group = account.getGroupStore().getOrCreateGroupV1(connection, groupIdV1);
+ if (group != null) {
+ group.setBlocked(groupV1Record.isBlocked());
+ account.getGroupStore().updateGroup(connection, group);
+ account.getGroupStore()
+ .storeStorageRecord(connection,
+ group.getGroupId(),
+ groupV1Record.getId(),
+ groupV1Record.toProto().encode());
+ }