mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-30 20:34:20 +01:00
Prevent deleting a group locally if the user is still a member
Fixes #924
This commit is contained in:
@@ -348,6 +348,11 @@ class ManagerImpl implements Manager {
|
||||
|
||||
@Override
|
||||
public void deleteGroup(GroupId groupId) throws IOException {
|
||||
final var group = context.getGroupHelper().getGroup(groupId);
|
||||
if (group.isMember(account.getSelfRecipientId())) {
|
||||
throw new IOException(
|
||||
"The local group information cannot be removed, as the user is still a member of the group");
|
||||
}
|
||||
context.getGroupHelper().deleteGroup(groupId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user