mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50: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
|
@ -786,7 +786,7 @@ public class DbusManagerImpl implements Manager {
|
|||
? Optional.empty()
|
||||
: Optional.of(new RecipientAddress(null, syncReceived.getDestination())),
|
||||
Set.of(),
|
||||
new MessageEnvelope.Data(syncReceived.getTimestamp(),
|
||||
Optional.of(new MessageEnvelope.Data(syncReceived.getTimestamp(),
|
||||
syncReceived.getGroupId().length > 0
|
||||
? Optional.of(new MessageEnvelope.Data.GroupContext(GroupId.unknownVersion(
|
||||
syncReceived.getGroupId()), false, 0))
|
||||
|
@ -806,7 +806,7 @@ public class DbusManagerImpl implements Manager {
|
|||
Optional.empty(),
|
||||
List.of(),
|
||||
List.of(),
|
||||
List.of()))),
|
||||
List.of())))),
|
||||
Optional.empty(),
|
||||
List.of(),
|
||||
List.of(),
|
||||
|
|
|
@ -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