Skip to content

WIP: Fetch all latest activities in a single request to speed up /conversations

Resolves #931 (closed)

When users load all their conversations via /api/v1/conversations, we need to add the latest activity (last_status) to each of them. We did it by fetching activities for each context sequentially that caused query timeouts for large datasets. In this MR I changed fetch_activities_for_contexts_query to fetch all the latest activities for all paginated user's contexts in a single request.

Edited by Sergey Suprunenko

Merge request reports