SOBotics / Higgs

A generic dashboard for viewing and providing feedback to SOBotics bots.
GNU General Public License v3.0
4 stars 0 forks source link

What is the best way to check if a post has been reported. #31

Open jdd-software opened 6 years ago

jdd-software commented 6 years ago

With a userscript we would like to know if a post/comment has been reported.

Probably we need a public end point (without access token) where user can send post_id/comment_id (in json contentId) and in response can get the report_id. If it is not present the response will be null or <=0.

The direct implementation is that we would like to avoid sending nc feedback in chat when a user flags no longer needed on a comment that has not been reported by HeatDetector.

rjrudman commented 6 years ago

I like this more than the current one we have. I quickly exposed an endpoint which lets you query for the contentUrl. However, there are various ways to build a link to content on SO, and since we're doing an exact text search, this isn't too reliable.

We'd also need to include the content type, to avoid id collisions. So maybe something like

api.higgs.sobotics.org/reviewer/check?contentId=123&contentType=comment api.higgs.sobotics.org/reviewer/check?contentId=123&contentType=question api.higgs.sobotics.org/reviewer/check?contentId=123&contentType=answer api.higgs.sobotics.org/reviewer/check?contentId=123&contentType=review

Higgs won't know about what contentTypes are available - that's up to the bots to decide when they register a post