processPushNotification - libtd-ktx

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


libtd-ktx / kotlinx.telegram.coroutines / processPushNotification

processPushNotification

suspend fun TelegramFlow.processPushNotification(payload: String?): Unit

Suspend function, which handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization.

Parameters

payload - JSON-encoded push notification payload with all fields sent by the server, and "google.sentTime" and "google.notification.sound" fields added.