mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-03 12:50:37 +00:00
Refactor receive api
This commit is contained in:
parent
b615a4b04d
commit
9075cc1a30
36 changed files with 1510 additions and 970 deletions
|
@ -1,10 +1,10 @@
|
|||
package org.asamk.signal.json;
|
||||
|
||||
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
|
||||
public record JsonContactAvatar(JsonAttachment attachment, boolean isProfile) {
|
||||
|
||||
static JsonContactAvatar from(SharedContact.Avatar avatar) {
|
||||
return new JsonContactAvatar(JsonAttachment.from(avatar.getAttachment()), avatar.isProfile());
|
||||
static JsonContactAvatar from(MessageEnvelope.Data.SharedContact.Avatar avatar) {
|
||||
return new JsonContactAvatar(JsonAttachment.from(avatar.attachment()), avatar.isProfile());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue