[Problem/Question]
I am trying to get the first message of a channel regardless of a user’s joined status in that channel.
However, messages before the user joined do not come back. I have tried both api and message collection. I have also tried toggling on/off the chat history option in the sendbird dashboard that allows users to see messages from before they joined.
Specifically, and regardless of any chat history problems, I just need to get the first message in a channel. If somebody has a quicker way to do this, please let me know and that will solve my problem.
Additional info -
React Native .70.
I am filtering to get MessageTypeFilter.USER messages.
All of these groups are super groups.
Using the SDK -
I cannot get any messages before the user joined, regardless of starting point, limit, nextResultLimit, prevResultLimit, and channel.
Using the API -
If I pass in Date.now() as starting point, I can get messages before the user joined.
If I pass in any other time, I cannot. This is regardless of any other parameters passed in.
// If problem, please fill out the below. If question, please delete.
[SDK Version]
4.12.3
[Reproduction Steps]
Join a channel that already has messages in it.
Create a message collection and filter by MessageTypeFilter.USER.
See if messages come back before you joined.
Use the Api instead of a message collection to get messages, filtered by MessageTypeFilter.USER.
Pass in Date.now().
Do it again, pass in any other time. Compare the result.
[Frequency]
Every channel of the same custom type, every time.
Other channel custom types are experiencing similar, but not exactly the same discrepancies with joining and being able to fetch chat history.
[Current impact]
It is breaking a feature of my app’s chat capabilities.