1
0
mirror of synced 2026-08-05 17:56:58 +00:00

FIX: Use SolvedTopics to list posts in /activity/solved instead of user actions (#376)

In https://github.com/discourse/discourse-solved/pull/342 we moved solutions away from topic_custom_fields into proper tables, with the tables as the proper source of truth to a topic's solution.

The user's /my/activity/solved route uses user_actions which is not accurate, and a user has reported a bug where their solution is not reflected there (user actions are not a good representation of what a topic's solution is). 

This commit introduces 
- a new route to get solutions, and is mindful `hide_user_profiles_from_public` and such settings
- also mindful of PMs and private categories
- a new template that makes use of the `<UserStream>` to load posts safely and avoid reimplementation
This commit is contained in:
Natalie Tay
2025-07-02 16:56:12 +08:00
committed by GitHub
parent 041b58eed1
commit f96aceb5f4
8 changed files with 374 additions and 9 deletions
@@ -9,8 +9,8 @@ acceptance(
needs.user();
needs.pretender((server, helper) => {
server.get("/user_actions.json", () =>
helper.response({ user_actions: [] })
server.get("/solution/by_user.json", () =>
helper.response({ user_solved_posts: [] })
);
});