ChatKtx.deleteHistory - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / ChatKtx / deleteHistory

deleteHistory

open suspend fun Chat.deleteHistory(removeFromChatList: Boolean, revoke: Boolean): Unit

Suspend function, which deletes all messages in the chat. Use Chat.canBeDeletedOnlyForSelf and Chat.canBeDeletedForAllUsers fields to find whether and how the method can be applied to the chat.

Parameters

removeFromChatList - Pass true if the chat should be removed from the chat list.

revoke - Pass true to try to delete chat history for all users.