[Problem/Question]
How to migrate from getMessagesByTimestamp to getPreviousMessagesByTimestamp on android
currently i have this implementation to fetch messages
channel?.getPreviousMessagesByTimestamp(
createdAt ?: Long.MAX_VALUE,
false,
CHANNEL_MESSAGE_LIMIT,
true,
BaseChannel.MessageTypeFilter.ALL,
null,
null,
true,
messageHandler
)
i tried migrating to the newer api, it was a bit confusing but i ended up with this,
val params = MessageListParams(
CHANNEL_MESSAGE_LIMIT,
CHANNEL_MESSAGE_LIMIT,
BaseChannel.MessageTypeFilter.ALL,
allowedMessageTypes,
userIds,
false,
true,
true,
true,
true,
true,
true
)
channel?.getMessagesByTimestamp(
createdAt ?: Long.MAX_VALUE,
params,
messageHandler
)
but this implementation didn’t work, the pagination just returns the same set of messages and completely broke the current implementation.
SDK Version: v3.1.24