mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
add group info on json message
This commit is contained in:
parent
5646f65195
commit
eac2a47163
5 changed files with 22 additions and 11 deletions
|
@ -2,6 +2,7 @@ package org.asamk.signal.json;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.api.GroupId;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
import org.asamk.signal.manager.api.RecipientAddress;
|
||||
|
@ -23,9 +24,9 @@ record JsonSyncMessage(
|
|||
@JsonInclude(JsonInclude.Include.NON_NULL) JsonSyncMessageType type
|
||||
) {
|
||||
|
||||
static JsonSyncMessage from(MessageEnvelope.Sync syncMessage) {
|
||||
static JsonSyncMessage from(MessageEnvelope.Sync syncMessage, Manager m) {
|
||||
final var sentMessage = syncMessage.sent().isPresent() && syncMessage.sent().get().story().isEmpty()
|
||||
? JsonSyncDataMessage.from(syncMessage.sent().get())
|
||||
? JsonSyncDataMessage.from(syncMessage.sent().get(), m)
|
||||
: null;
|
||||
final var sentStoryMessage = syncMessage.sent().isPresent() && syncMessage.sent().get().story().isPresent()
|
||||
? JsonSyncStoryMessage.from(syncMessage.sent().get())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue