Send self messages as normal messages, new flag --note-to-self for sync message

Fixes #373
This commit is contained in:
AsamK 2021-01-16 11:56:41 +01:00
parent b31e97dd2d
commit e1134d832a
7 changed files with 98 additions and 18 deletions

View file

@ -78,6 +78,21 @@ public class DbusSignalImpl implements Signal {
}
}
@Override
public long sendNoteToSelfMessage(
final String message, final List<String> attachments
) throws Error.AttachmentInvalid, Error.Failure, Error.UnregisteredUser, Error.UntrustedIdentity {
try {
final Pair<Long, List<SendMessageResult>> results = m.sendSelfMessage(message, attachments);
checkSendMessageResults(results.first(), results.second());
return results.first();
} catch (AttachmentInvalidException e) {
throw new Error.AttachmentInvalid(e.getMessage());
} catch (IOException e) {
throw new Error.Failure(e.getMessage());
}
}
@Override
public void sendEndSessionMessage(final List<String> recipients) {
try {