Allow copy/paste of formatting and mentions

This commit is contained in:
Scott Nonnenberg 2023-05-09 17:40:19 -07:00 committed by GitHub
parent 320ac044a8
commit b4caf67bf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 1003 additions and 446 deletions

View file

@ -28,11 +28,13 @@ import { isNotNil } from './isNotNil';
import { collect } from './iterables';
import { DurationInSeconds } from './durations';
import { sanitizeLinkPreview } from '../services/LinkPreview';
import type { DraftBodyRanges } from '../types/BodyRange';
export async function sendStoryMessage(
listIds: Array<string>,
conversationIds: Array<string>,
attachment: AttachmentType
attachment: AttachmentType,
bodyRanges: DraftBodyRanges | undefined
): Promise<void> {
if (getStoriesBlocked()) {
log.warn('stories.sendStoryMessage: stories disabled, returning early');
@ -171,6 +173,7 @@ export async function sendStoryMessage(
// on the receiver side.
return window.Signal.Migrations.upgradeMessageSchema({
attachments,
bodyRanges,
conversationId: ourConversation.id,
expireTimer: DurationInSeconds.DAY,
expirationStartTimestamp: Date.now(),
@ -277,6 +280,7 @@ export async function sendStoryMessage(
const messageAttributes =
await window.Signal.Migrations.upgradeMessageSchema({
attachments,
bodyRanges,
canReplyToStory: true,
conversationId: group.id,
expireTimer: DurationInSeconds.DAY,