Process incoming story messages

This commit is contained in:
Josh Perez 2022-03-04 16:14:52 -05:00 committed by GitHub
parent df7cdfacc7
commit eb91eb6fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
84 changed files with 4382 additions and 652 deletions

View file

@ -1810,6 +1810,7 @@ export class ConversationModel extends window.Backbone
groupVersion,
groupId: this.get('groupId'),
groupLink: this.getGroupLink(),
hideStory: Boolean(this.get('hideStory')),
inboxPosition,
isArchived: this.get('isArchived')!,
isBlocked: this.isBlocked(),
@ -3790,10 +3791,12 @@ export class ConversationModel extends window.Backbone
{
dontClearDraft,
sendHQImages,
storyId,
timestamp,
}: {
dontClearDraft?: boolean;
sendHQImages?: boolean;
storyId?: string;
timestamp?: number;
} = {}
): Promise<void> {
@ -3872,6 +3875,7 @@ export class ConversationModel extends window.Backbone
updatedAt: now,
})
),
storyId,
});
if (isDirectConversation(this.attributes)) {
@ -4963,6 +4967,11 @@ export class ConversationModel extends window.Backbone
}
}
toggleHideStories(): void {
this.set({ hideStory: !this.get('hideStory') });
this.captureChange('hideStory');
}
setMuteExpiration(
muteExpiresAt = 0,
{ viaStorageServiceSync = false } = {}