MCPcopy Create free account
hub / github.com/block/buzz / sendChannelMessage

Function sendChannelMessage

desktop/src/shared/api/tauri.ts:825–856  ·  view source on GitHub ↗
(
  channelId: string,
  content: string,
  parentEventId?: string | null,
  mediaTags?: string[][],
  mentionPubkeys?: string[],
  kind?: number,
  emojiTags?: string[][],
  mentionTags?: string[][],
)

Source from the content-addressed store, hash-verified

823}
824
825export 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
858export type BlobDescriptor = {
859 url: string;

Callers 7

UserProfilePopoverFunction · 0.90
HomeViewFunction · 0.90
useSendMessageMutationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected