listComments

List the comments in the current conversation.

📘

This function is only available on context of type singleConversation and messageComposer

function listComments(paginationToken?: string, cancelToken?: CancelToken): Promise<PaginatedResults<Comment>>

Parameters

ParameterTypeDescription
paginationTokenPaginationTokenToken of the requested page. If omitted, will return the first page of results.
cancelTokenCancel tokenToken to cancel the request.

Return value

The function returns a promise that resolves with a paginated list of comments.

PropertyTypeDescription
nextPageTokenPaginationToken (optional)Token to access the next page of results, if any.
resultsArray of CommentList of comments.

Errors

MessageDescription
The draft's conversation is not selected.This error applies to composer plugins. It occurs when the messageComposer context for composer plugins does not have access to the conversation. To avoid this error, disable the functionality of this method whenever the conversation property does not exist in the messageComposer context. Learn more in the Context topic.