Fix save profile avatar disappearing on save name/bio

This commit is contained in:
Jamie Kyle 2024-02-09 13:14:32 -08:00 committed by GitHub
parent 4a73b48f3f
commit cf9a376df8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 38 deletions

View file

@ -13,22 +13,15 @@ import { strictAssert } from '../util/assert';
import { isWhitespace } from '../util/whitespaceStringUtil';
import { imagePathToBytes } from '../util/imagePathToBytes';
import { getAbsoluteProfileAvatarPath } from '../util/avatarUtils';
import type { AvatarUpdateType } from '../types/Avatar';
import type {
AvatarUpdateOptionsType,
AvatarUpdateType,
} from '../types/Avatar';
import MessageSender from '../textsecure/SendMessage';
export type WriteProfileOptionsType = Readonly<
| {
keepAvatar: true;
}
| {
keepAvatar?: false;
avatarUpdate: AvatarUpdateType;
}
>;
export async function writeProfile(
conversation: ConversationType,
options: WriteProfileOptionsType
options: AvatarUpdateOptionsType
): Promise<void> {
const { server } = window.textsecure;
if (!server) {