Avatar defaults and colors

This commit is contained in:
Josh Perez
2021-08-05 20:17:05 -04:00
committed by GitHub
parent a001882d58
commit 12d2b1bf7c
140 changed files with 4212 additions and 1084 deletions

View File

@@ -16,7 +16,7 @@ const { encryptProfile, encryptProfileItemWithPadding } = Crypto;
export async function encryptProfileData(
conversation: ConversationType,
avatarData?: ArrayBuffer
avatarBuffer?: ArrayBuffer
): Promise<[ProfileRequestDataType, ArrayBuffer | undefined]> {
const {
aboutEmoji,
@@ -59,7 +59,7 @@ export async function encryptProfileData(
PaddedLengths.AboutEmoji
)
: null,
avatarData ? encryptProfile(avatarData, keyBuffer) : undefined,
avatarBuffer ? encryptProfile(avatarBuffer, keyBuffer) : undefined,
]);
const profileData = {
@@ -68,7 +68,7 @@ export async function encryptProfileData(
about: bytesAbout ? arrayBufferToBase64(bytesAbout) : null,
aboutEmoji: bytesAboutEmoji ? arrayBufferToBase64(bytesAboutEmoji) : null,
paymentAddress: window.storage.get('paymentAddress') || null,
avatar: Boolean(avatarData),
avatar: Boolean(avatarBuffer),
commitment: deriveProfileKeyCommitment(profileKey, uuid),
};