Files
ThreadNet-Web/src/dispatcher/payloads/SharePayload.ts
T
013f5a0c91 /share?msg=foo endpoint using forward message dialog (#29874)
* basic implementation of an /share?msg=foo endpoint

* SharePayload

* add sharing html & md while we're at it

* remove whitespace from imports to appease linter

* lint

* Add unit test

* More tests

* Test for showScreen

* Use one of the typed strings

* Test nasty tags stripped out

* Add playwright test

* Fix flake

by not relying on the name being synced as soon as we load

---------

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2025-05-28 18:48:32 +00:00

30 lines
618 B
TypeScript

/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { type ActionPayload } from "../payloads";
import { type Action } from "../actions";
export enum ShareFormat {
Text = "text",
Html = "html",
Markdown = "md",
}
export interface SharePayload extends ActionPayload {
action: Action.Share;
/**
* The format of message to be shared (optional)
*/
format: ShareFormat;
/**
* The message to be shared.
*/
msg: string;
}