User profile page feed
Hello everyone,
I'm trying to achieve something quite difficult for my current knowledge in lithium so a little help to build the rest query will by very appreciated. When visiting a user profile page, I want to display a feed of the last 10 activities of that user including:
- Replied to a message or comment (display the user comment)
- Kudoed a message or comment (display the kudoed comment)
- Marked a comment as solution (display the solution comment)
order those activity by date (most recent on top)
frardouin- This is a bit tricky, you will need to make a nested call for this.
1. The first call will fetch all the solved topics posted by an author
SELECT * FROM messages WHERE depth = 0 AND conversation.solved = true AND author.id = '<authorID>'
2. The second Call will fetch the accepted solution
SELECT * FROM messages WHERE is_solution = true and topic.id = '<topid id you will get from first call>'
Docoumentation: https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=messages#constraints-conversation.solved
Regarding the re-ordering, if you want to show all the activities together, you need to sort it manually, you can not fetch all the details using on call. e.g store all the query result into on variable and then sort it by post_time.