Skip to content

Commit

Permalink
feat(channel): add hard_delete flag to channel.delete (#885)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Deme <[email protected]>
  • Loading branch information
yaziine and peterdeme authored Jan 25, 2022
1 parent a8c77b9 commit d0c0e5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,14 @@ export class Channel<
/**
* delete - Delete the channel. Messages are permanently removed.
*
* @param {boolean} [options.hard_delete] Defines if the channel is hard deleted or not
*
* @return {Promise<DeleteChannelAPIResponse<ChannelType, CommandType, UserType>>} The server response
*/
async delete() {
async delete(options: { hard_delete?: boolean } = {}) {
return await this.getClient().delete<DeleteChannelAPIResponse<ChannelType, CommandType, UserType>>(
this._channelURL(),
{},
{ ...options },
);
}

Expand Down

0 comments on commit d0c0e5d

Please sign in to comment.