Flagged PMs show notification of Flag to Moderators but are not Viewable


(cpradio) #1

Repro steps:

  1. Create three accounts (Admin, Moderator, and Regular User)
  2. As Admin Promote the Moderator to TL 2 (and obviously give the Moderator, Moderation abilities) and the Regular User to TL 1
  3. Send a PM as the Moderator to the Regular User (who sends the PM and who receives it, really doesn’t matter for this test)
  4. As the recipient of the PM, flag the PM as Inappropriate
  5. Login as the Moderator, notice the Flag Notification on the hamburger menu, click on the Flags link from the hamburger menu, you are greeted with:
  6. Login as an Admin, notice the Flag Notification on the hamburger menu, click on the Flags link, you are greeted with:

Expectations:
Moderators does not see the flag notification (for flags they cannot access)

Actual:
Moderators receive the flag notification for flags they cannot access.


Flagging inside PMs makes flag undismissable
Notification of a flag is shown but no active flag present
(Jeff Atwood) #2

Since we decided moderators can’t view pms I don’t see a way around this.


(cpradio) #3

Is there a way to not include those flags in the indicator for moderators? Give them a different count?


(Mittineague) #4

I’ve learned that when I see a Notification that I can’t access it’s most likely a Flagged PM. So that in itself isn’t much of a problem for me.

What is a problem, is that I like to keep my Notifications “clean” and when there is a PM Flag one there I tend to ignore it. A problem because with my aged vision I fail to easily notice the count change and I ocassionally miss a Notification that I could deal with.


(cpradio) #5

Right, that is what I’ve found myself doing recently too. Because I knew it was related to a PM, I simply started to ignore the counter entirely (not a good thing).


(Dave McClure) #6

Perhaps a flagged PM should just open access to moderators for that topic?


(Jeff Atwood) #7

I think the logic gets pretty hairy for that case.


(cpradio) #8

Okay, so I found the logic, and it looks like it may be simple enough to update, but seeing how I’ve yet to dive into redis, I thought it’d be better to ask :smile:

Okay, so my “idea” would be to create a second query. As the current one works fine for Administrators, but the second one would take into account Moderators and strip posts the moderator doesn’t have access to.

Then two values would be stored in redis, one for administrators, the other for moderators, and the appropriate value will be pushed to the appropriate user’s. (okay, so that handles the update_flagged_posts_count.

Now for the flagged_posts_count, I’d create another property to read the moderator flagged posts count from redis and then in the current_user_serializer, I’d read the appropriate PostAction.property based on if they are an Administrator or Moderator.

Does that sound like a reasonable process? Is there anything I’m missing? This seems doable, but there may very well be reason it wasn’t done and I’d hate to add a nasty regression. :smile:


(mott555) #9

Why not remove the flag option from PMs?


(Mittineague) #10

Members need a way to Flag problem PMs.

But maybe instead of triggering a Notification that only Admins can access an alternative would be to CC the Admin?


#11

Here’s another wrinkle:

If someone flags a post in a PM topic which I can see because it’s directed to moderators, but my name isn’t on there wasn’t on there originally (i.e., the PM topic generated by a Notify the Mods flag) then I can’t see the flag even though I can see the flagged post.


#12

Oh, also, I can’t see the flag if I flag something in a PM to me. Obviously, this is kind of a silly use case, but it could be someone else flagging something in a multi-user PM, of course.


(Jeff Atwood) #13

PMs are now visible to mods when they are actively flagged. And stop being visible once the flag is handled.


(Jeff Atwood) #14