mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Implement EditMessageReceived signal for dbus
This commit is contained in:
parent
7b5b5776f0
commit
a66dd0dc79
4 changed files with 124 additions and 1 deletions
|
@ -74,6 +74,27 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
getMessageExtras(message)));
|
||||
}
|
||||
}
|
||||
if (envelope.edit().isPresent()) {
|
||||
var editMessage = envelope.edit().get();
|
||||
var message = editMessage.dataMessage();
|
||||
|
||||
var groupId = message.groupContext()
|
||||
.map(MessageEnvelope.Data.GroupContext::groupId)
|
||||
.map(GroupId::serialize)
|
||||
.orElseGet(() -> new byte[0]);
|
||||
var isGroupUpdate = message.groupContext()
|
||||
.map(MessageEnvelope.Data.GroupContext::isGroupUpdate)
|
||||
.orElse(false);
|
||||
if (!message.isEndSession() && !isGroupUpdate) {
|
||||
conn.sendMessage(new Signal.EditMessageReceived(objectPath,
|
||||
message.timestamp(),
|
||||
editMessage.targetSentTimestamp(),
|
||||
senderString,
|
||||
groupId,
|
||||
message.body().orElse(""),
|
||||
getMessageExtras(message)));
|
||||
}
|
||||
}
|
||||
if (envelope.sync().isPresent()) {
|
||||
var syncMessage = envelope.sync().get();
|
||||
if (syncMessage.sent().isPresent()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue