use distinct() on recipientList to remove duplicates
@@ -51,6 +51,7 @@ public class RecipientBoxHelper {
recipients.stream()
.filter(isOurs.or(isSender))
.filter(Objects::nonNull)
+ .distinct()
.map(Base64.getDecoder()::decode)
.map(Box.PublicKey::fromBytes)
.map(Box.PublicKey::bytesArray)
@@ -103,6 +104,7 @@ public class RecipientBoxHelper {
recipients.stream()
.filter(r -> issender || ourKeys.contains(r))
.map(Base64.getDecoder()::decode)
+ .distinct()
.map(Box.PublicKey::fromBytes)
.map(Box.PublicKey::bytesArray)
.map(Base64.getEncoder()::encodeToString)
