If you press return during a search of private messages the search operator used is private_messages:username
but it should be in:private
shouldn’t it?
In needs some conditional logic, needs to behave slightly different if you are an admin.
https://github.com/discourse/discourse/pull/3655
Submitted a PR.
@sam How is an admin affected? I’m not too sure about this point.
Admins need to search the target user’s PMs, not their own.
To clarify, how is an admin able to search through any user’s private message now? in:private user:<username>
?
As the op states, private_messages:username
Is that working right now? When I was looking into fixing this bug, I discovered that private_messages:username
in the query is not being handled neither on the client nor the server. I hope I didn’t miss anything
So private_messages:username
is a feature for admin
Absolutely since mods can’t see PMs (sorry “personal” messages, not private @downey) only Admins can.
It’s kind of an edge case, but say an admin is trying to figure out a pattern of a person sending abusive PMs, they might want to search from that person’s Messages page to figure out what kind of hate they’re slinging via PM and to who.
Very narrow use case, can mostly be ignored for now IMO. 99.9% of the time you search your own PMs.
I suppose the admin could impersonate the user and look at his messages too
Impersonation is only available for “site-installer” admins aka “listed in app.yml with an email address” from what I remember @sam telling me, so it is a level even higher than Admin. Don’t think that’s a good thing to rely on.
Nope impersonation of admin/mod is restricted to “developers” aka site installers
Ok so searching personal messages for admins is a feature the hasn’t been implemented but is something we want?
Not really sure, no one ever asked for this
Ah ok I was under the impression the feature had been implemented but broken
The main use case we need to cover is enter searching all a users public posts when on a random users profile, that is common
Searching someone else’s PMs is a bit creepy, probably should be logged