I am trying to retrievesee and show ifwhether a comment on question/answer is flagged or notby the authenticated user.
- But whenever I use /questions/{ids},
can_flag
istrue
irregardless of whether the user (me) can actually flag the comment. - When I use /comments/{ids}, I get the correct status.
- Editors note: additional/updated/different info in the answer below, but this still looks like a set of bugs.
I see there is can_flag variable but whenever I use /questions/{ids} i always get can_flag
is true
.Example:
For The API Sandbox question on Meta Stack Exchange:
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).
But the
/questions/{ids}
route showscan_flag: true
, which is incorrect:
However when i retrieved individual comment using /comments/{ids} i am getting correct status.
2. However, using `/comments/{ids}` I get `can_flag: false`, which is **correct**:
2. I also tried `/comments/{ids}` **for an unflagged comment** ([comment ID:396655][8]). It gives`can_flag: true`, which is **correct**:
In first Answer, I flagged 5th comment (Comment ID: 764560). Below screenshotWhy is from /questions/{ids}
and i am receivingthere an inconsistency? can_flag=true
.This looks like a bug.
However when i callNote: I did (re)check /commentsquestions/{ids}
I get can_flag=false
which is correct. I also tried with 4th30 minutes after flagging the comment (Comment ID:396655) for which i received can_flag=true
.
4th Comment
5th Comment
Why is there an inconsistency? Is So this does not seem to be a bug? or is this designed this way?time-delay/caching issue.