mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Prevent deleting a group locally if the user is still a member
Fixes #924
This commit is contained in:
parent
8dc82a30af
commit
02a018462b
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue