mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Only send our profile key to recipient who are in our contact list
This commit is contained in:
parent
20bf605e36
commit
26aa31edc2
1 changed files with 4 additions and 5 deletions
|
@ -548,8 +548,7 @@ public class Manager implements Signal {
|
|||
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().serialize());
|
||||
.withReaction(reaction);
|
||||
if (groupId != null) {
|
||||
SignalServiceGroup group = SignalServiceGroup.newBuilder(SignalServiceGroup.Type.DELIVER)
|
||||
.withId(groupId)
|
||||
|
@ -714,7 +713,6 @@ public class Manager implements Signal {
|
|||
|
||||
messageBuilder.withAttachments(attachmentPointers);
|
||||
}
|
||||
messageBuilder.withProfileKey(account.getProfileKey().serialize());
|
||||
sendMessageLegacy(messageBuilder, getSignalServiceAddresses(recipients));
|
||||
}
|
||||
|
||||
|
@ -723,8 +721,7 @@ public class Manager implements Signal {
|
|||
throws IOException, EncapsulatedExceptions, AttachmentInvalidException, InvalidNumberException {
|
||||
SignalServiceDataMessage.Reaction reaction = new SignalServiceDataMessage.Reaction(emoji, remove, targetAuthor, targetSentTimestamp);
|
||||
final SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder()
|
||||
.withReaction(reaction)
|
||||
.withProfileKey(account.getProfileKey().serialize());
|
||||
.withReaction(reaction);
|
||||
sendMessageLegacy(messageBuilder, getSignalServiceAddresses(recipients));
|
||||
}
|
||||
|
||||
|
@ -1201,8 +1198,10 @@ public class Manager implements Signal {
|
|||
ContactInfo contact = account.getContactStore().getContact(address);
|
||||
if (contact != null) {
|
||||
messageBuilder.withExpiration(contact.messageExpirationTime);
|
||||
messageBuilder.withProfileKey(account.getProfileKey().serialize());
|
||||
} else {
|
||||
messageBuilder.withExpiration(0);
|
||||
messageBuilder.withProfileKey(null);
|
||||
}
|
||||
message = messageBuilder.build();
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue