mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
25 lines
693 B
Java
25 lines
693 B
Java
package org.asamk.signal;
|
|
|
|
import org.whispersystems.signalservice.api.messages.SignalServiceGroup;
|
|
import org.whispersystems.signalservice.internal.util.Base64;
|
|
|
|
import java.util.List;
|
|
|
|
class JsonGroupInfo {
|
|
|
|
String groupId;
|
|
List<String> members;
|
|
String name;
|
|
String type;
|
|
|
|
JsonGroupInfo(SignalServiceGroup groupInfo) {
|
|
this.groupId = Base64.encodeBytes(groupInfo.getGroupId());
|
|
if (groupInfo.getMembers().isPresent()) {
|
|
this.members = groupInfo.getMembers().get();
|
|
}
|
|
if (groupInfo.getName().isPresent()) {
|
|
this.name = groupInfo.getName().get();
|
|
}
|
|
this.type = groupInfo.getType().toString();
|
|
}
|
|
}
|