Closed ahmadrushdie closed 2 years ago
This is an old method.. where did you find it?
The current docs are here:
https://chat-sdk.gitbook.io/chat-sdk/guides/api-cheatsheet#messaging-server-notifications
@bensmiley how to achive like this on IOS
ChatSDK.events().sourceOnMain() .filter(NetworkEvent.filterType(EventType.MessageAdded))
.filter(NetworkEvent.filterThreadEntityID(thread[0].entityID))
.subscribe {
val message: Message = it.message
messagesAdapter.addItem(message)
Handler().postDelayed(Runnable {
binding.rcMessages.smoothScrollToPosition(messagesAdapter.messages.size + 1)
}, 100)
}
Listen to income messages for spesific thread?
@ahmadrushdie it's in the same document... Look at hooks, ios.
public static String MessageReceived = "MessageReceived";
i am trying to listen to incomming messages in the controller using doc in the documentation they mention
any complete example how to use in swift ?