mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Update libsignal-service-java
This commit is contained in:
parent
5837a6982b
commit
a80e18169a
14 changed files with 84 additions and 46 deletions
|
@ -79,27 +79,29 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
if (syncMessage.sent().isPresent()) {
|
||||
var transcript = syncMessage.sent().get();
|
||||
|
||||
if (transcript.destination().isPresent() || transcript.message().groupContext().isPresent()) {
|
||||
var message = transcript.message();
|
||||
var groupId = message.groupContext()
|
||||
.map(MessageEnvelope.Data.GroupContext::groupId)
|
||||
.map(GroupId::serialize)
|
||||
.orElseGet(() -> new byte[0]);
|
||||
if (transcript.message().isPresent()) {
|
||||
final var dataMessage = transcript.message().get();
|
||||
if (transcript.destination().isPresent() || dataMessage.groupContext().isPresent()) {
|
||||
var groupId = dataMessage.groupContext()
|
||||
.map(MessageEnvelope.Data.GroupContext::groupId)
|
||||
.map(GroupId::serialize)
|
||||
.orElseGet(() -> new byte[0]);
|
||||
|
||||
conn.sendMessage(new Signal.SyncMessageReceived(objectPath,
|
||||
transcript.message().timestamp(),
|
||||
senderString,
|
||||
transcript.destination().map(RecipientAddress::getLegacyIdentifier).orElse(""),
|
||||
groupId,
|
||||
message.body().orElse(""),
|
||||
getAttachments(message)));
|
||||
conn.sendMessage(new Signal.SyncMessageReceivedV2(objectPath,
|
||||
transcript.message().timestamp(),
|
||||
senderString,
|
||||
transcript.destination().map(RecipientAddress::getLegacyIdentifier).orElse(""),
|
||||
groupId,
|
||||
message.body().orElse(""),
|
||||
getMessageExtras(message)));
|
||||
conn.sendMessage(new Signal.SyncMessageReceived(objectPath,
|
||||
dataMessage.timestamp(),
|
||||
senderString,
|
||||
transcript.destination().map(RecipientAddress::getLegacyIdentifier).orElse(""),
|
||||
groupId,
|
||||
dataMessage.body().orElse(""),
|
||||
getAttachments(dataMessage)));
|
||||
conn.sendMessage(new Signal.SyncMessageReceivedV2(objectPath,
|
||||
dataMessage.timestamp(),
|
||||
senderString,
|
||||
transcript.destination().map(RecipientAddress::getLegacyIdentifier).orElse(""),
|
||||
groupId,
|
||||
dataMessage.body().orElse(""),
|
||||
getMessageExtras(dataMessage)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue