-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jailson Dias
committed
Oct 24, 2024
1 parent
88e296e
commit 9db116c
Showing
5 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package org.asamk.signal.json; | ||
|
||
import org.asamk.signal.manager.Manager; | ||
import org.asamk.signal.manager.api.MessageEnvelope; | ||
|
||
record JsonEditMessage(long targetSentTimestamp, JsonDataMessage dataMessage) { | ||
|
||
static JsonEditMessage from(MessageEnvelope.Edit editMessage) { | ||
return new JsonEditMessage(editMessage.targetSentTimestamp(), JsonDataMessage.from(editMessage.dataMessage())); | ||
static JsonEditMessage from(MessageEnvelope.Edit editMessage, Manager m) { | ||
return new JsonEditMessage(editMessage.targetSentTimestamp(), JsonDataMessage.from(editMessage.dataMessage(), m)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
package org.asamk.signal.json; | ||
|
||
import org.asamk.signal.manager.Manager; | ||
import org.asamk.signal.manager.api.MessageEnvelope; | ||
|
||
record JsonGroupInfo(String groupId, String type) { | ||
record JsonGroupInfo(String groupId, String groupName, int revision, String type) { | ||
|
||
static JsonGroupInfo from(MessageEnvelope.Data.GroupContext groupContext) { | ||
static JsonGroupInfo from(MessageEnvelope.Data.GroupContext groupContext, Manager m) { | ||
return new JsonGroupInfo(groupContext.groupId().toBase64(), | ||
m.getGroup(groupContext.groupId()).title(), | ||
groupContext.revision(), | ||
groupContext.isGroupUpdate() ? "UPDATE" : "DELIVER"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters