Delete a Message

Last Edit: Feb 02 2020

You can delete a message by calling deleteMessage  and including a message with an ID:


await client.deleteMessage(messageID);
                    

client.deleteMessage("messageID", new MessageCallback(){
    @Override
    public void onSuccess(MessageResponse response) {

    }

    @Override
    public void onError(String errMsg, int errCode) {

    }
});
                    

// Delete a message.
channel.delete(message: message).subscribe().disposed(by: disposeBag)
// or
message.delete().subscribe().disposed(by: disposeBag)
                    

channel.deleteMessage(messageID, object : MessageCallback {
    override fun onSuccess(response: MessageResponse) {}

    override fun onError(errMsg: String, errCode: Int) {}
})
                    

$delete = $client->deleteMessage('message-id');
                    

await client.deleteMessage("123");