getCurrentState - libtd-ktx

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


libtd-ktx / kotlinx.telegram.coroutines / getCurrentState

getCurrentState

suspend fun TelegramFlow.getCurrentState(): Updates

Suspend function, which returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. This is an offline method. Can be called before authorization.

Return Updates Contains a list of updates.