Since updating to mattermost 6.0, whenever I switch channels in the app I have to wait from 3 to 15 seconds because of a slow
/api/v4/users/<id>/channels/<id>/posts/unread?limit_after=30&limit_before=30&skipFetchThreads=false&collapsedThreads=false&collapsedThreadsExtended=false API call.
Steps to reproduce
On our installation, switching channels is sufficient to trigger this behavior.
The channels should load faster.
I noticed a weird thing, the response shows a bunch of messages that I have already read, as I don’t have any unread badges in my whole mattermost app.
Screenshot of chrome devtools: