mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-30 11:04:21 +01:00
@@ -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) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user