Default disappearing message timeout fixes

This commit is contained in:
Fedor Indutny 2021-06-25 16:52:56 -07:00 committed by GitHub
parent c9415dcf67
commit cd28e71bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 456 additions and 164 deletions

View file

@ -48,7 +48,6 @@ import {
getClientZkGroupCipher,
getClientZkProfileOperations,
} from './util/zkgroup';
import * as universalExpireTimer from './util/universalExpireTimer';
import {
computeHash,
deriveMasterKeyFromGroupV1,
@ -1477,10 +1476,12 @@ export async function fetchMembershipProof({
export async function createGroupV2({
name,
avatar,
expireTimer,
conversationIds,
}: Readonly<{
name: string;
avatar: undefined | ArrayBuffer;
expireTimer: undefined | number;
conversationIds: Array<string>;
}>): Promise<ConversationModel> {
// Ensure we have the credentials we need before attempting GroupsV2 operations
@ -1709,7 +1710,6 @@ export async function createGroupV2({
window.MessageController.register(model.id, model);
conversation.trigger('newmessage', model);
const expireTimer = universalExpireTimer.get();
if (expireTimer) {
await conversation.updateExpirationTimer(expireTimer);
}