mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-06 15:44:19 +01:00
Implement replying to stories
This commit is contained in:
@@ -624,6 +624,14 @@ class ManagerImpl implements Manager {
|
||||
}
|
||||
messageBuilder.withPreviews(previews);
|
||||
}
|
||||
if (message.storyReply().isPresent()) {
|
||||
final var storyReply = message.storyReply().get();
|
||||
final var authorServiceId = context.getRecipientHelper()
|
||||
.resolveSignalServiceAddress(context.getRecipientHelper().resolveRecipient(storyReply.author()))
|
||||
.getServiceId();
|
||||
messageBuilder.withStoryContext(new SignalServiceDataMessage.StoryContext(authorServiceId,
|
||||
storyReply.timestamp()));
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayList<SignalServiceDataMessage.Mention> resolveMentions(final List<Message.Mention> mentionList) throws UnregisteredRecipientException {
|
||||
|
||||
@@ -9,7 +9,8 @@ public record Message(
|
||||
List<Mention> mentions,
|
||||
Optional<Quote> quote,
|
||||
Optional<Sticker> sticker,
|
||||
List<Preview> previews
|
||||
List<Preview> previews,
|
||||
Optional<StoryReply> storyReply
|
||||
) {
|
||||
|
||||
public record Mention(RecipientIdentifier.Single recipient, int start, int length) {}
|
||||
@@ -19,4 +20,6 @@ public record Message(
|
||||
public record Sticker(byte[] packId, int stickerId) {}
|
||||
|
||||
public record Preview(String url, String title, String description, Optional<String> image) {}
|
||||
|
||||
public record StoryReply(long timestamp, RecipientIdentifier.Single author) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user