Migrate GV1 to GV2 on to server. Allow query of group status.

This commit is contained in:
Alan Evans
2020-10-20 17:43:17 -03:00
parent 31e137cf6d
commit 985a220fca
5 changed files with 160 additions and 63 deletions

View File

@@ -96,6 +96,11 @@ public class AvatarHelper {
return ModernDecryptingPartInputStream.createFor(attachmentSecret, avatarFile, 0);
}
public static byte[] getAvatarBytes(@NonNull Context context, @NonNull RecipientId recipientId) throws IOException {
return hasAvatar(context, recipientId) ? Util.readFully(getAvatar(context, recipientId))
: null;
}
/**
* Returns the size of the avatar on disk.
*/