Edited flagged posts leaves no paper trail of flagging

Version: v2.2.0.beta5 +54

One of our enterprising users who maintains their own Discourse instance tried to juke our moderators on one of their flagged posts today.

Steps to replicate
1 - User flags post inappropriate
2 - Post appears in moderation’s flagged post queue
3 - Moderator agrees with flag, post gets hidden, post moves to previously flagged posts collection
4 - Post creator edits the post just a tiny bit, like, adds a period.
5 - Post gets unhidden, flag disappears from “previous flagged posts”

So, only by the grace of our memory did we remember that it happened, but we have no paper trail that it happened.

6 Likes

Can you repro this @jomaxro?

Yep, I can repro. Thanks for the clear steps @DanQuayle.

Once those steps are followed, there’s no indication the post was ever flagged. It’s gone from the “old flagged posts” queue. There’s no indicator on the post itself that it was flagged. Even looking at the user’s admin page their flag count was reset:

6 Likes

We should address this later in 2.3 with the work @eviltrout is doing.

2 Likes

Hi, enterprising user here! The bug is more complex than that. I did do a significant edit for the first flag and it was brought back up as per the general rules. However, the second time it was flagged it didn’t remember the full edit history. The first significant edit didn’t make it through for them to see the change. I’m guessing the continuity issue is related.

Is this handled now @eviltrout?

It should be, yes. The reviewable is never deleted now and history should always be kept. It would be good if @jomaxro could confirm though.

2 Likes

This is partially resolved. The flagged post does now appear in the review queue when filtered to “all reviewed”, but there “this post was flagged” indicator still does not appear on the post itself, and the user is still listed with 0 flags received on their admin page.

3 Likes

I’m about to re-write this for some UX enhancements @codinghorror suggested but don’t resolved flags not show up on a post when viewing it? I thought it was only pending flags that showed up. 0 flags does seem like a bug - could you forward me the example? (privately is fine.)

This made me think about it more, and I do believe you’re right (I was remembering wrong). xyz sent a message to this user appears, but not flags.

I just tested this on try, so there’s an example there for the next 18 hours or so. If you need me to create an example not on try, let me know.
https://try.discourse.org/admin/users/4184/joshua_rosenfeld shows 0 flags, despite having a post flagged as inappropriate.


Another thought, should we show the revision of the post at the time of the flag, rather than the current revision? When the post in the screenshot above was flagged, it read:

This post is inappropriate. It should be flagged!’

Reviewing the queue afterwards may lead to some confusion as to why a moderator approved a flag.

1 Like

I believe that is quite complex. Perhaps show the post was edited recently with an edit indicator like we do on live posts, instead? And provide a way to show edit history dialog there @eviltrout?

Edit history is more complex, but for Akismet/Queued posts we store the content at the time the reviewable was created. That is probably simplest because that is what you are reviewing.

2 Likes

Actually I looked into it and it’s somewhat more complicated than I initially thought and have come back around.

The issue with storing the content of the post at flagging time is that multiple users might flag a post, and the user might be editing it in between. I think the moderator wants to see the most current version of the thing they are approving in the queue, which is how it works now.

1 Like

I think access to edit revision dialog here with a recent edit indicator is 100% the way to go. Basically the same way we do it on live posts…

2 Likes

As of the following commit, flagged posts will show the pencil icon in the review queue and clicking it will pop up the history modal to see the edits to the post.

https://github.com/discourse/discourse/commit/15c9b003073bcdab6268c84c63c4a0c22398e6d7

9 Likes