// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package chat

// schema: chat.bsky.convo.sendMessage

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

// ConvoSendMessage_Input is the input argument to a chat.bsky.convo.sendMessage call.
type ConvoSendMessage_Input struct {
	ConvoId string                  `json:"convoId" cborgen:"convoId"`
	Message *ConvoDefs_MessageInput `json:"message" cborgen:"message"`
}

// ConvoSendMessage calls the XRPC method "chat.bsky.convo.sendMessage".
func ConvoSendMessage(ctx context.Context, c util.LexClient, input *ConvoSendMessage_Input) (*ConvoDefs_MessageView, error) {
	var out ConvoDefs_MessageView
	if err := c.LexDo(ctx, util.Procedure, "application/json", "chat.bsky.convo.sendMessage", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
