X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/fc0a9b4102feef185e4a09881e3b079b82df3da7..1fae09433d79ede67febe3257abf1f1dbd2146e6:/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java index fcbadd38..9ae58122 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -274,15 +274,9 @@ public class DbusManagerImpl implements Manager { } if (updateGroup.getGroupLinkState() != null) { switch (updateGroup.getGroupLinkState()) { - case DISABLED: - group.disableLink(); - break; - case ENABLED: - group.enableLink(false); - break; - case ENABLED_WITH_APPROVAL: - group.enableLink(true); - break; + case DISABLED -> group.disableLink(); + case ENABLED -> group.enableLink(false); + case ENABLED_WITH_APPROVAL -> group.enableLink(true); } } return new SendGroupMessageResults(0, List.of()); @@ -327,9 +321,9 @@ public class DbusManagerImpl implements Manager { final Message message, final Set recipients ) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException { return handleMessage(recipients, - numbers -> signal.sendMessage(message.getMessageText(), message.getAttachments(), numbers), - () -> signal.sendNoteToSelfMessage(message.getMessageText(), message.getAttachments()), - groupId -> signal.sendGroupMessage(message.getMessageText(), message.getAttachments(), groupId)); + numbers -> signal.sendMessage(message.messageText(), message.attachments(), numbers), + () -> signal.sendNoteToSelfMessage(message.messageText(), message.attachments()), + groupId -> signal.sendGroupMessage(message.messageText(), message.attachments(), groupId)); } @Override