refactor(desktop): extract link preview helpers

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w
2026-07-30 10:27:36 -07:00
parent 2f988aae17
commit 2ac9528955
6 changed files with 242 additions and 229 deletions

View File

@@ -0,0 +1,21 @@
import { invokeTauri } from "@/shared/api/tauri";
export async function editMessage(
channelId: string,
eventId: string,
content: string,
mediaTags?: string[][],
emojiTags?: string[][],
mentionPubkeys?: string[],
suppressLinkPreviews?: boolean,
): Promise<void> {
await invokeTauri("edit_message", {
channelId,
eventId,
content,
mediaTags: mediaTags ?? [],
emojiTags: emojiTags ?? [],
mentionPubkeys: mentionPubkeys ?? null,
suppressLinkPreviews: suppressLinkPreviews ?? false,
});
}