Skip to content

Commit

Permalink
feat: commit message endpoint (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
miagilepner authored Oct 26, 2022
1 parent a86411f commit 8927c64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3053,4 +3053,14 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
createAbortControllerForNextRequest() {
return (this.nextRequestAbortController = new AbortController());
}

/**
* commits a pending message, making it visible in the channel and for other users
* @param id the message id
*
* @return {APIResponse & MessageResponse} The message
*/
async commitMessage(id: string) {
return await this.post<APIResponse & MessageResponse>(this.baseURL + `/messages/${id}/commit`);
}
}

0 comments on commit 8927c64

Please sign in to comment.