mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-08-06 05:13:46 +01:00
18 lines
582 B
TypeScript
18 lines
582 B
TypeScript
// Copyright 2026 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import type {
|
|
ReadonlyMessageAttributesType,
|
|
StoryReplyContextType,
|
|
} from '../model-types.d.ts';
|
|
import { isAciString } from './isAciString.std.ts';
|
|
import { strictAssert } from './assert.std.ts';
|
|
|
|
export function getStoryReplyContext(
|
|
storyMessage: Pick<ReadonlyMessageAttributesType, 'sourceServiceId'>
|
|
): StoryReplyContextType {
|
|
const { sourceServiceId: authorAci } = storyMessage;
|
|
strictAssert(isAciString(authorAci), 'Story message author must be an ACI');
|
|
return { authorAci };
|
|
}
|