Onboarding story

This commit is contained in:
Josh Perez 2022-11-08 21:38:19 -05:00 committed by GitHub
parent 94f318ea08
commit 19a42ed719
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 725 additions and 143 deletions

View file

@ -130,6 +130,7 @@ import { getConversationIdForLogging } from '../util/idForLogging';
import { getSendTarget } from '../util/getSendTarget';
import { getRecipients } from '../util/getRecipients';
import { validateConversation } from '../util/validateConversation';
import { isSignalConversation } from '../util/isSignalConversation';
/* eslint-disable more/no-then */
window.Whisper = window.Whisper || {};
@ -3357,6 +3358,10 @@ export class ConversationModel extends window.Backbone
return;
}
if (isSignalConversation(this.attributes)) {
return;
}
if (hasUserInitiatedMessages) {
await this.maybeRemoveUniversalTimer();
return;
@ -3920,6 +3925,10 @@ export class ConversationModel extends window.Backbone
return;
}
if (isSignalConversation(this.attributes)) {
return;
}
const now = timestamp || Date.now();
log.info(
@ -4446,6 +4455,10 @@ export class ConversationModel extends window.Backbone
): Promise<boolean | null | MessageModel | void> {
const isSetByOther = providedSource || providedSentAt !== undefined;
if (isSignalConversation(this.attributes)) {
return;
}
if (isGroupV2(this.attributes)) {
if (isSetByOther) {
throw new Error(
@ -5086,6 +5099,9 @@ export class ConversationModel extends window.Backbone
getAbsoluteAvatarPath(): string | undefined {
const avatarPath = this.getAvatarPath();
if (isSignalConversation(this.attributes)) {
return avatarPath;
}
return avatarPath ? getAbsoluteAttachmentPath(avatarPath) : undefined;
}
@ -5199,6 +5215,10 @@ export class ConversationModel extends window.Backbone
// [X] dontNotifyForMentionsIfMuted
// [x] firstUnregisteredAt
captureChange(logMessage: string): void {
if (isSignalConversation(this.attributes)) {
return;
}
log.info('storageService[captureChange]', logMessage, this.idForLogging());
this.set({ needsStorageServiceSync: true });