public OutgoingGroupMediaMessage( @NonNull Recipients recipients, @NonNull String encodedGroupContext, @NonNull List<Attachment> avatar, long sentTimeMillis) throws IOException { super( recipients, encodedGroupContext, avatar, sentTimeMillis, ThreadDatabase.DistributionTypes.CONVERSATION); this.group = GroupContext.parseFrom(Base64.decode(encodedGroupContext)); }
public OutgoingGroupMediaMessage( @NonNull Recipients recipients, @NonNull GroupContext group, @Nullable final Attachment avatar, long sentTimeMillis) { super( recipients, Base64.encodeBytes(group.toByteArray()), new LinkedList<Attachment>() { { if (avatar != null) add(avatar); } }, System.currentTimeMillis(), ThreadDatabase.DistributionTypes.CONVERSATION); this.group = group; }
public boolean isGroupQuit() { return group.getType().getNumber() == GroupContext.Type.QUIT_VALUE; }
public boolean isGroupUpdate() { return group.getType().getNumber() == GroupContext.Type.UPDATE_VALUE; }