Implement sending message quotes

Fixes #213
This commit is contained in:
AsamK 2021-11-21 19:18:17 +01:00
parent 415b65d208
commit d13d150fe1
6 changed files with 87 additions and 29 deletions

View file

@ -199,7 +199,7 @@ public class DbusSignalImpl implements Signal {
@Override
public long sendMessage(final String message, final List<String> attachments, final List<String> recipients) {
try {
final var results = m.sendMessage(new Message(message, attachments, List.of()),
final var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()),
getSingleRecipientIdentifiers(recipients, m.getSelfNumber()).stream()
.map(RecipientIdentifier.class::cast)
.collect(Collectors.toSet()));
@ -364,7 +364,7 @@ public class DbusSignalImpl implements Signal {
final String message, final List<String> attachments
) throws Error.AttachmentInvalid, Error.Failure, Error.UntrustedIdentity {
try {
final var results = m.sendMessage(new Message(message, attachments, List.of()),
final var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()),
Set.of(RecipientIdentifier.NoteToSelf.INSTANCE));
checkSendMessageResults(results.timestamp(), results.results());
return results.timestamp();
@ -390,7 +390,7 @@ public class DbusSignalImpl implements Signal {
@Override
public long sendGroupMessage(final String message, final List<String> attachments, final byte[] groupId) {
try {
var results = m.sendMessage(new Message(message, attachments, List.of()),
var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()),
Set.of(new RecipientIdentifier.Group(getGroupId(groupId))));
checkSendMessageResults(results.timestamp(), results.results());
return results.timestamp();