import org.asamk.signal.manager.groups.GroupId;
import org.asamk.signal.manager.groups.GroupInviteLinkUrl;
import org.asamk.signal.manager.groups.GroupNotFoundException;
+import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
import org.asamk.signal.manager.groups.LastGroupAdminException;
import org.asamk.signal.manager.groups.NotAGroupMemberException;
import org.asamk.signal.manager.storage.identities.IdentityInfo;
throw new Error.AttachmentInvalid(e.getMessage());
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
return results.getTimestamp();
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
return results.getTimestamp();
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
return results.getTimestamp();
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
throw new Error.AttachmentInvalid(e.getMessage());
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
return results.getTimestamp();
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
} catch (AttachmentInvalidException e) {
throw new Error.AttachmentInvalid(e.getMessage());
return results.getTimestamp();
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
}
}
m.setContactBlocked(getSingleRecipientIdentifier(number, m.getUsername()), blocked);
} catch (NotMasterDeviceException e) {
throw new Error.Failure("This command doesn't work on linked devices.");
+ } catch (IOException e) {
+ throw new Error.Failure(e.getMessage());
}
}
m.setGroupBlocked(getGroupId(groupId), blocked);
} catch (GroupNotFoundException e) {
throw new Error.GroupNotFound(e.getMessage());
+ } catch (IOException e) {
+ throw new Error.Failure(e.getMessage());
}
}
}
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
- } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new Error.GroupNotFound(e.getMessage());
} catch (AttachmentInvalidException e) {
throw new Error.AttachmentInvalid(e.getMessage());
public void quitGroup(final byte[] groupId) {
var group = getGroupId(groupId);
try {
- m.sendQuitGroupMessage(group, Set.of());
+ m.quitGroup(group, Set.of());
} catch (GroupNotFoundException | NotAGroupMemberException e) {
throw new Error.GroupNotFound(e.getMessage());
} catch (IOException | LastGroupAdminException e) {