Forum Discussion
Thank you very much TariqHussain
For the "mark as solution" query I want the answer marked by the user, not the post.
Also, is it possible to re-order all activities by date without taking the type in consideration? (I dont want to have all the reply and then all the like, etc.)
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.