Chat Interceptor
This feature is available from 2.73.
Integrator can intercept send chat action and take decision whether to send it or not.
chatSession.sendMessage(
"Hello",
null,
null,
object : LiveLikeCallback<LiveLikeChatMessage>() {
override fun onResponse(result: LiveLikeChatMessage?, error: String?) {}
},
chatInterceptor = { livelikeChatMessage->
//return boolean to allow this message to send or not
}
)
The Chat Stock UI also supports ChatInterceptor.
For this integrator has to override the value chatInterceptor in ChatView.
chatView.chatInterceptor = object : ChatInterceptor {
override fun invoke(p1: LiveLikeChatMessage): Boolean {
// return boolean
}
}
Updated 5 months ago