X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/badbb55ef2151d7396c23be5a827c40712cd645a..fea19c9e20ed07228420dae93399911a659e51b1:/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 9ffb0795..8e92cdf4 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -15,6 +15,8 @@ import org.asamk.signal.manager.api.MessageEnvelope; import org.asamk.signal.manager.api.NotPrimaryDeviceException; import org.asamk.signal.manager.api.Pair; import org.asamk.signal.manager.api.ReceiveConfig; +import org.asamk.signal.manager.api.Recipient; +import org.asamk.signal.manager.api.RecipientAddress; import org.asamk.signal.manager.api.RecipientIdentifier; import org.asamk.signal.manager.api.SendGroupMessageResults; import org.asamk.signal.manager.api.SendMessageResults; @@ -34,8 +36,6 @@ import org.asamk.signal.manager.groups.LastGroupAdminException; import org.asamk.signal.manager.groups.NotAGroupMemberException; import org.asamk.signal.manager.storage.recipients.Contact; import org.asamk.signal.manager.storage.recipients.Profile; -import org.asamk.signal.manager.storage.recipients.Recipient; -import org.asamk.signal.manager.storage.recipients.RecipientAddress; import org.freedesktop.dbus.DBusMap; import org.freedesktop.dbus.DBusPath; import org.freedesktop.dbus.connections.impl.DBusConnection; @@ -364,7 +364,8 @@ public class DbusManagerImpl implements Manager { final boolean remove, final RecipientIdentifier.Single targetAuthor, final long targetSentTimestamp, - final Set recipients + final Set recipients, + final boolean isStory ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException { return handleMessage(recipients, numbers -> signal.sendMessageReaction(emoji, @@ -388,7 +389,8 @@ public class DbusManagerImpl implements Manager { public SendMessageResults sendPaymentNotificationMessage( final byte[] receipt, final String note, final RecipientIdentifier.Single recipient ) throws IOException { - throw new UnsupportedOperationException(); + final var timestamp = signal.sendPaymentNotification(receipt, note, recipient.getIdentifier()); + return new SendMessageResults(timestamp, Map.of()); } @Override @@ -751,12 +753,14 @@ public class DbusManagerImpl implements Manager { messageReceived.getGroupId()), false, 0)) : Optional.empty(), Optional.empty(), + Optional.empty(), Optional.of(messageReceived.getMessage()), 0, false, false, false, false, + false, Optional.empty(), Optional.empty(), Optional.empty(), @@ -767,6 +771,7 @@ public class DbusManagerImpl implements Manager { List.of(), List.of())), Optional.empty(), + Optional.empty(), Optional.empty()); notifyMessageHandlers(envelope); }; @@ -792,6 +797,7 @@ public class DbusManagerImpl implements Manager { Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); notifyMessageHandlers(envelope); }; @@ -821,12 +827,14 @@ public class DbusManagerImpl implements Manager { syncReceived.getGroupId()), false, 0)) : Optional.empty(), Optional.empty(), + Optional.empty(), Optional.of(syncReceived.getMessage()), 0, false, false, false, false, + false, Optional.empty(), Optional.empty(), Optional.empty(), @@ -835,7 +843,8 @@ public class DbusManagerImpl implements Manager { Optional.empty(), List.of(), List.of(), - List.of())))), + List.of())), + Optional.empty())), Optional.empty(), List.of(), List.of(), @@ -843,6 +852,7 @@ public class DbusManagerImpl implements Manager { Optional.empty(), Optional.empty(), Optional.empty())), + Optional.empty(), Optional.empty()); notifyMessageHandlers(envelope); };