Pressing return when searching in messages returns no results

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?

1 Like

In needs some conditional logic, needs to behave slightly different if you are an admin.

3 Likes

https://github.com/discourse/discourse/pull/3655

Submitted a PR.

@sam How is an admin affected? I’m not too sure about this point.

2 Likes

Admins need to search the target user’s PMs, not their own.

4 Likes

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 :smiley_cat:

2 Likes

So private_messages:username is a feature for admin :question:

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.

2 Likes

I suppose the admin could impersonate the user and look at his messages too :smile:

1 Like

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.

1 Like

Nope impersonation of admin/mod is restricted to “developers” aka site installers

3 Likes

Ok so searching personal messages for admins is a feature the hasn’t been implemented but is something we want? :cat:

Not really sure, no one ever asked for this

1 Like

Ah ok I was under the impression the feature had been implemented but broken :smile:

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

2 Likes

This? :confused:

Fixed per

https://github.com/discourse/discourse/commit/6086b07324d02f5d31a498790cf51cd081dbb74c

:wink:

2 Likes