+ public void sendGroupMessageReaction(String emoji, boolean remove, SignalServiceAddress targetAuthor,
+ long targetSentTimestamp, byte[] groupId)
+ throws IOException, EncapsulatedExceptions, AttachmentInvalidException {
+ SignalServiceDataMessage.Reaction reaction = new SignalServiceDataMessage.Reaction(emoji, remove, targetAuthor, targetSentTimestamp);
+ final SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder()
+ .withReaction(reaction)
+ .withProfileKey(account.getProfileKey());
+ if (groupId != null) {
+ SignalServiceGroup group = SignalServiceGroup.newBuilder(SignalServiceGroup.Type.DELIVER)
+ .withId(groupId)
+ .build();
+ messageBuilder.asGroupMessage(group);
+ }
+ final GroupInfo g = getGroupForSending(groupId);
+ // Don't send group message to ourself
+ final List<String> membersSend = new ArrayList<>(g.members);
+ membersSend.remove(this.username);
+ sendMessageLegacy(messageBuilder, membersSend);
+ }
+