- if (groupInfo.getName().isPresent()) {
- this.name = groupInfo.getName().get();
- }
- this.type = groupInfo.getType().toString();
+ }
+
+ JsonGroupInfo(SignalServiceGroupV2 groupInfo) {
+ this.groupId = GroupUtils.getGroupIdV2(groupInfo.getMasterKey()).toBase64();
+ this.type = groupInfo.hasSignedGroupChange() ? "UPDATE" : "DELIVER";
+ this.members = null;
+ this.name = null;