1 package org
.asamk
.signal
.json
;
3 import com
.fasterxml
.jackson
.annotation
.JsonInclude
;
4 import com
.fasterxml
.jackson
.annotation
.JsonProperty
;
6 import org
.whispersystems
.signalservice
.api
.messages
.SignalServiceTypingMessage
;
8 import java
.util
.Base64
;
10 class JsonTypingMessage
{
19 @JsonInclude(JsonInclude
.Include
.NON_NULL
)
22 JsonTypingMessage(SignalServiceTypingMessage typingMessage
) {
23 this.action
= typingMessage
.getAction().name();
24 this.timestamp
= typingMessage
.getTimestamp();
25 final var encoder
= Base64
.getEncoder();
26 this.groupId
= typingMessage
.getGroupId().transform(encoder
::encodeToString
).orNull();