final var quoteTimestamp = ns.getLong("quote-timestamp");
if (quoteTimestamp != null) {
final var quoteAuthor = ns.getString("quote-author");
+ if (quoteAuthor == null) {
+ throw new UserErrorException("Quote author parameter is missing");
+ }
final var quoteMessage = ns.getString("quote-message");
final var quoteMentionStrings = ns.<String>getList("quote-mention");
final var quoteMentions = quoteMentionStrings == null
: m.sendMessage(message, recipientIdentifiers, notifySelf);
outputResult(outputWriter, results);
} catch (AttachmentInvalidException | IOException e) {
- throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
- .getSimpleName() + ")", e);
+ if (e instanceof IOException io && io.getMessage().contains("No prekeys available")) {
+ throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
+ .getSimpleName() + "), maybe one of the devices of the recipient wasn't online for a while.",
+ e);
+ } else {
+ throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
+ .getSimpleName() + ")", e);
+ }
} catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
throw new UserErrorException(e.getMessage());
} catch (UnregisteredRecipientException e) {