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

package chat

// schema: chat.bsky.convo.getConvo

import (
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

// ConvoGetConvo_Output is the output of a chat.bsky.convo.getConvo call.
type ConvoGetConvo_Output struct {
	Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"`
}

// ConvoGetConvo calls the XRPC method "chat.bsky.convo.getConvo".
func ConvoGetConvo(ctx context.Context, c *xrpc.Client, convoId string) (*ConvoGetConvo_Output, error) {
	var out ConvoGetConvo_Output

	params := map[string]interface{}{
		"convoId": convoId,
	}
	if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvo", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
