import org.asamk.signal.manager.api.Identity;
import org.asamk.signal.manager.api.InactiveGroupLinkException;
import org.asamk.signal.manager.api.InvalidDeviceLinkException;
+import org.asamk.signal.manager.api.InvalidUsernameException;
import org.asamk.signal.manager.api.Message;
import org.asamk.signal.manager.api.MessageEnvelope;
import org.asamk.signal.manager.api.NotPrimaryDeviceException;
updateProfile.isDeleteAvatar());
}
+ @Override
+ public String setUsername(final String username) throws IOException, InvalidUsernameException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void deleteUsername() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public void unregister() throws IOException {
signal.unregister();
throw new UnsupportedOperationException();
}
final var group = getRemoteObject(signal.getGroup(groupId.serialize()), Signal.Group.class);
- group.quitGroup();
+ try {
+ group.quitGroup();
+ } catch (Signal.Error.GroupNotFound e) {
+ throw new GroupNotFoundException(groupId);
+ } catch (Signal.Error.NotAGroupMember e) {
+ throw new NotAGroupMemberException(groupId, group.Get("org.asamk.Signal.Group", "Name"));
+ } catch (Signal.Error.LastGroupAdmin e) {
+ throw new LastGroupAdminException(groupId, group.Get("org.asamk.Signal.Group", "Name"));
+ }
return new SendGroupMessageResults(0, List.of());
}