Pressing return when searching in messages returns no results

(Alex Hartley) #1

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?

(Sam Saffron) #2

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

(Alan Tan) #3

Submitted a PR.

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

(Kane York) #4

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

(Alan Tan) #5

To clarify, how is an admin able to search through any user’s private message now? in:private user:<username>?

(Kane York) #6

As the op states, private_messages:username

(Alan Tan) #7

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:

(Alan Tan) #8

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

(Jeff Atwood) #9

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.

(Alan Tan) #10

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

(Jeff Atwood) #11

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.

(Sam Saffron) #12

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

(Alan Tan) #13

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

(Sam Saffron) #14

Not really sure, no one ever asked for this

(Alan Tan) #15

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

(Sam Saffron) #16

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

(Alan Tan) #17

This? :confused:

(Sam Saffron) #18

Fixed per


(Sam Saffron) #19