mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
parent
89f568dd1f
commit
53b84bad02
5 changed files with 47 additions and 5 deletions
|
@ -683,6 +683,16 @@ public class ManagerImpl implements Manager {
|
|||
if (attachments != null) {
|
||||
messageBuilder.withAttachments(attachmentHelper.uploadAttachments(attachments));
|
||||
}
|
||||
if (message.mentions().size() > 0) {
|
||||
final var mentions = new ArrayList<SignalServiceDataMessage.Mention>();
|
||||
for (final var m : message.mentions()) {
|
||||
final var recipientId = resolveRecipient(m.recipient());
|
||||
mentions.add(new SignalServiceDataMessage.Mention(resolveSignalServiceAddress(recipientId).getAci(),
|
||||
m.start(),
|
||||
m.length()));
|
||||
}
|
||||
messageBuilder.withMentions(mentions);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,4 +2,7 @@ package org.asamk.signal.manager.api;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public record Message(String messageText, List<String> attachments) {}
|
||||
public record Message(String messageText, List<String> attachments, List<Mention> mentions) {
|
||||
|
||||
public record Mention(RecipientIdentifier.Single recipient, int start, int length) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue