mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
11 lines
401 B
Java
11 lines
401 B
Java
package org.asamk.signal.json;
|
|
|
|
import org.asamk.signal.manager.api.MessageEnvelope;
|
|
import org.asamk.signal.util.Util;
|
|
|
|
public record JsonContactPhone(String value, String type, String label) {
|
|
|
|
static JsonContactPhone from(MessageEnvelope.Data.SharedContact.Phone phone) {
|
|
return new JsonContactPhone(phone.value(), phone.type().name(), Util.getStringIfNotBlank(phone.label()));
|
|
}
|
|
}
|