]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/SendReactionCommand.java
Refactor Manager interface
[signal-cli] / src / main / java / org / asamk / signal / commands / SendReactionCommand.java
index 11a16b2e8a3c0aa04c43704faecad09c3fdd45ab..f8c3c358183f819a124cb56d78ced8ce82aca18e 100644 (file)
@@ -72,7 +72,7 @@ public class SendReactionCommand implements DbusCommand, JsonRpcLocalCommand {
         try {
             final var results = m.sendMessageReaction(emoji,
                     isRemove,
-                    CommandUtil.getSingleRecipientIdentifier(targetAuthor, m.getUsername()),
+                    CommandUtil.getSingleRecipientIdentifier(targetAuthor, m.getSelfNumber()),
                     targetTimestamp,
                     recipientIdentifiers);
             outputResult(outputWriter, results.getTimestamp());
@@ -81,7 +81,7 @@ public class SendReactionCommand implements DbusCommand, JsonRpcLocalCommand {
             throw new UserErrorException(e.getMessage());
         } catch (IOException e) {
             throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                    .getSimpleName() + ")");
+                    .getSimpleName() + ")", e);
         }
     }
 
@@ -129,7 +129,7 @@ public class SendReactionCommand implements DbusCommand, JsonRpcLocalCommand {
             throw new UserErrorException("Failed to send to group: " + e.getMessage());
         } catch (DBusExecutionException e) {
             throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                    .getSimpleName() + ")");
+                    .getSimpleName() + ")", e);
         }
     }