Metaculus / metaculus

https://www.metaculus.com
BSD 2-Clause "Simplified" License
54 stars 12 forks source link

Add `mentioned_users` to the response when creating or editing a comment #1387

Open ncarazon opened 1 week ago

ncarazon commented 1 week ago

Current behavior

In order to gracefully update mention links on the front-end, we need BE to provide mentioned_users right after creating/editing a comment. Right now, the api/comments/create/ endpoint returns an empty array even when there is a mention, and the /comments/${commentData.id}/edit/ endpoint returns an empty object. Therefore, we have to make an extra call to /comments/, providing the focus_comment_id to get the actual data as a workaround.

Expected/desired behavior

Both endpoints populate mentioned_users in the response