I'm running across an extremely strange bug while using GetStream: i'm running a script to migrate over 200k activities (previously used an internal stream-framework fork) and I'm running across a really bizarre issue.
The problem is this: I'm setting the 'time' field to a custom value (usually in the past). Now: these activities are being ordered wrong by the API.
Although the activities being added have correct, ISO8601 UTC times in the past, the oldest ones are coming back on top of the feed (mixed with only a couple of new activities).
This is really odd and I'm at the end of my wits -- this seems like an issue on Stream's end.
Thoughts? Below is a screenshot of the issue.
Surprisingly, it works as expected because API considers last n
operations to build the feed. After retrieving these operations, they are ordered according to time. That's why if you add old activities, they are the only operations to build the feed.
Workaround to this is that adding activities in reverse order such that insert old activities first and new activities last then you will be able to read the new ones.
Moreover, if you are importing a lot of activities, you might consider import feature.