I’m using Smack v4.3.0 for Android. The issue is, when a user rejoins a group, all the chat histories are being delivered. Want to know how to disable this. I’m using the following code snippet for joining the group.
I am following your code. But still I am not getting any messages of group. There are already many messages in it but still returning 0. Below is code for that:
private fun initGroupChatRoom(){
val mucEnterConfiguration = multiUserChat?.getEnterConfigurationBuilder(nickname)!!
.requestNoHistory()
.build()
if (!multiUserChat!!.isJoined) {
multiUserChat?.join(mucEnterConfiguration)
}
multiUserChat?.addMessageListener(incomingMessageListener)
}
private fun chatHistory(){
CoroutineScope(Dispatchers.IO).launch {
var mamManager = MamManager.getInstanceFor(multiUserChat)
var result = async {
mamManager.enableMamForAllMessages()
mamManager.queryMostRecentPage(jId, 70)
}.await()
}
}