File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/org/asamk/signal/commands Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,14 @@ public void handleCommand(
250250 : m .sendMessage (message , recipientIdentifiers , notifySelf );
251251 outputResult (outputWriter , results );
252252 } catch (AttachmentInvalidException | IOException e ) {
253- throw new UnexpectedErrorException ("Failed to send message: " + e .getMessage () + " (" + e .getClass ()
254- .getSimpleName () + ")" , e );
253+ if (e instanceof IOException io && io .getMessage ().contains ("No prekeys available" )) {
254+ throw new UnexpectedErrorException ("Failed to send message: " + e .getMessage () + " (" + e .getClass ()
255+ .getSimpleName () + "), maybe one of the devices of the recipient wasn't online for a while." ,
256+ e );
257+ } else {
258+ throw new UnexpectedErrorException ("Failed to send message: " + e .getMessage () + " (" + e .getClass ()
259+ .getSimpleName () + ")" , e );
260+ }
255261 } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e ) {
256262 throw new UserErrorException (e .getMessage ());
257263 } catch (UnregisteredRecipientException e ) {
You can’t perform that action at this time.
0 commit comments