( channelId: string, content: string, parentEventId?: string | null, mediaTags?: string[][], mentionPubkeys?: string[], kind?: number, emojiTags?: string[][], mentionTags?: string[][], )
| 823 | } |
| 824 | |
| 825 | export async function sendChannelMessage( |
| 826 | channelId: string, |
| 827 | content: string, |
| 828 | parentEventId?: string | null, |
| 829 | mediaTags?: string[][], |
| 830 | mentionPubkeys?: string[], |
| 831 | kind?: number, |
| 832 | emojiTags?: string[][], |
| 833 | mentionTags?: string[][], |
| 834 | ): Promise<SendChannelMessageResult> { |
| 835 | const response = await invokeTauri<RawSendChannelMessageResult>( |
| 836 | "send_channel_message", |
| 837 | { |
| 838 | channelId, |
| 839 | content, |
| 840 | parentEventId, |
| 841 | mediaTags: mediaTags ?? null, |
| 842 | emojiTags: emojiTags ?? null, |
| 843 | mentionTags: mentionTags ?? null, |
| 844 | mentionPubkeys: mentionPubkeys ?? null, |
| 845 | kind: kind ?? null, |
| 846 | }, |
| 847 | ); |
| 848 | |
| 849 | return { |
| 850 | eventId: response.event_id, |
| 851 | parentEventId: response.parent_event_id, |
| 852 | rootEventId: response.root_event_id, |
| 853 | depth: response.depth, |
| 854 | createdAt: response.created_at, |
| 855 | }; |
| 856 | } |
| 857 | |
| 858 | export type BlobDescriptor = { |
| 859 | url: string; |
no outgoing calls
no test coverage detected