send Data Or Work With Query Id
inline fun sendDataOrWorkWithQueryId(onSendData: () -> String?, onAnswerWebAppQuery: (WebAppQueryId) -> Unit)
Content copied to clipboard
Parameters
on Send Data
Should return the data which must be used in WebApp.sendData. If returns null, data will not be sent
on Answer Web App Query
In case if WebAppInitData.queryId is presented in WebApp.initDataUnsafe, will be called that callback. Before and after calling of this callback will not be used any method of answering to the telegram system, so, you must use something like answerWebAppQuery by yourself to send the result