Skip to main content
2 of 2
Clarified question; trimmed and annotated images; incorporated comments (now deleted).
Brock Adams
  • 13k
  • 5
  • 39
  • 64

Comments have incorrect `can_flag` values for at least 2 different API routes

I am trying to see and show whether a comment on question/answer is flagged by the authenticated user.

  1. But whenever I use /questions/{ids}, can_flag is true irregardless of whether the user (me) can actually flag the comment.
  2. When I use /comments/{ids}, I get the correct status.
  3. Editors note: additional/updated/different info in the answer below, but this still looks like a set of bugs.

Example:

  1. For The API Sandbox question on Meta Stack Exchange:

  2. In this answer there (Id 54725), I flagged the (now deleted) comment with ID 764560 (Link now works only for SE devs and MetaSE moderators).

  3. But the /questions/{ids} route shows can_flag: true, which is incorrect:

questions route shows incorrect can_flag


2. However, using `/comments/{ids}` I get `can_flag: false`, which is **correct**:

comments route shows correct can_flag for flagged comment


2. I also tried `/comments/{ids}` **for an unflagged comment** ([comment ID:396655][8]). It gives`can_flag: true`, which is **correct**:

comments route shows correct can_flag for unflagged comment

Why is there an inconsistency? This looks like a bug.


Note: I did (re)check /questions/{ids} 30 minutes after flagging the comment. So this does not seem to be a time-delay/caching issue.

AVK
  • 279
  • 1
  • 10