Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3757014
D9167.id32479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9167.id32479.diff
View Options
diff --git a/lib/types/avatar-types.js b/lib/types/avatar-types.js
--- a/lib/types/avatar-types.js
+++ b/lib/types/avatar-types.js
@@ -24,6 +24,11 @@
+uploadID: string,
};
+export type EncryptedImageAvatarDBContent = {
+ +type: 'encrypted-image',
+ +uploadID: string,
+};
+
export type ENSAvatarDBContent = {
+type: 'ens',
};
@@ -33,6 +38,7 @@
export type AvatarDBContent =
| EmojiAvatarDBContent
| ImageAvatarDBContent
+ | EncryptedImageAvatarDBContent
| ENSAvatarDBContent;
export type UpdateUserAvatarRemoveRequest = { +type: 'remove' };
@@ -53,12 +59,20 @@
uri: t.String,
});
+export type ClientEncryptedImageAvatar = {
+ +type: 'encrypted-image',
+ +blobURI: string,
+ +encryptionKey: string,
+ +thumbHash: ?string,
+};
+
export type ClientENSAvatar = ENSAvatarDBContent;
const clientENSAvatarValidator = ensAvatarDBContentValidator;
export type ClientAvatar =
| ClientEmojiAvatar
| ClientImageAvatar
+ | ClientEncryptedImageAvatar
| ClientENSAvatar;
export const clientAvatarValidator: TUnion<ClientAvatar> = t.union([
clientEmojiAvatarValidator,
@@ -66,7 +80,10 @@
clientENSAvatarValidator,
]);
-export type ResolvedClientAvatar = ClientEmojiAvatar | ClientImageAvatar;
+export type ResolvedClientAvatar =
+ | ClientEmojiAvatar
+ | ClientImageAvatar
+ | ClientEncryptedImageAvatar;
export type UpdateUserAvatarResponse = {
+updates: CreateUpdatesResult,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:54 AM (20 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2860892
Default Alt Text
D9167.id32479.diff (1 KB)
Attached To
Mode
D9167: [lib] Introduce new avatar type for encrypted images
Attached
Detach File
Event Timeline
Log In to Comment