signal-cli/src/main/java/org/asamk/signal/JsonGroupInfo.java
2018-11-18 17:12:39 +01:00

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();
}
}