mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Always include profile key in direct messages
Adjusts behavior to official client Fixes #416
This commit is contained in:
parent
9bba7a85ab
commit
9bb935b11f
1 changed files with 4 additions and 8 deletions
|
@ -1342,16 +1342,12 @@ public class Manager implements Closeable {
|
|||
}
|
||||
} else {
|
||||
// Send to all individually, so sync messages are sent correctly
|
||||
messageBuilder.withProfileKey(account.getProfileKey().serialize());
|
||||
List<SendMessageResult> results = new ArrayList<>(recipients.size());
|
||||
for (SignalServiceAddress address : recipients) {
|
||||
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);
|
||||
}
|
||||
final ContactInfo contact = account.getContactStore().getContact(address);
|
||||
final int expirationTime = contact != null ? contact.messageExpirationTime : 0;
|
||||
messageBuilder.withExpiration(expirationTime);
|
||||
message = messageBuilder.build();
|
||||
if (address.matches(account.getSelfAddress())) {
|
||||
results.add(sendSelfMessage(message));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue