mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-08-28 05:56:15 +00:00
14 lines
442 B
Java
14 lines
442 B
Java
package org.asamk.signal.json;
|
|
|
|
import io.micronaut.jsonschema.JsonSchema;
|
|
|
|
import org.asamk.signal.manager.api.MessageEnvelope;
|
|
|
|
@JsonSchema(title = "ContactAvatar")
|
|
public record JsonContactAvatar(JsonAttachment attachment, boolean isProfile) {
|
|
|
|
static JsonContactAvatar from(MessageEnvelope.Data.SharedContact.Avatar avatar) {
|
|
return new JsonContactAvatar(JsonAttachment.from(avatar.attachment()), avatar.isProfile());
|
|
}
|
|
}
|