X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/207764e0be91aeb9a6c52fa8639a822555f8759a..fea19c9e20ed07228420dae93399911a659e51b1:/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java diff --git a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java index 58863d08..95aba4c4 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java @@ -667,14 +667,19 @@ class ManagerImpl implements Manager { boolean remove, RecipientIdentifier.Single targetAuthor, long targetSentTimestamp, - Set recipients + Set recipients, + final boolean isStory ) throws IOException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException, UnregisteredRecipientException { var targetAuthorRecipientId = context.getRecipientHelper().resolveRecipient(targetAuthor); - var reaction = new SignalServiceDataMessage.Reaction(emoji, - remove, - context.getRecipientHelper().resolveSignalServiceAddress(targetAuthorRecipientId).getServiceId(), - targetSentTimestamp); + final var authorServiceId = context.getRecipientHelper() + .resolveSignalServiceAddress(targetAuthorRecipientId) + .getServiceId(); + var reaction = new SignalServiceDataMessage.Reaction(emoji, remove, authorServiceId, targetSentTimestamp); final var messageBuilder = SignalServiceDataMessage.newBuilder().withReaction(reaction); + if (isStory) { + messageBuilder.withStoryContext(new SignalServiceDataMessage.StoryContext(authorServiceId, + targetSentTimestamp)); + } return sendMessage(messageBuilder, recipients); }