element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
72 stars 12 forks source link

Searching for @user:home.server doesn't show messages of that user #1477

Open ell1e opened 1 year ago

ell1e commented 1 year ago

Steps to reproduce

Searching for @user:home.server doesn't show messages of that user.

  1. Click top-right search button while in a room. The search bar should appear with the focus on "This room". Enter an account of someone in that room who wrote something previously in the form of @user:home.server. Also try @user (which IMHO should match everyone with a handle starting like that inside the room), and user and displayname.
  2. Confirm with enter to start the search

Outcome

What did you expect?

All messages of that users are part of the results

What happened instead?

Only mentions and responses show up. Same when searching for the user's display name instead, neither that nor full account handle seem to work properly to see someone's messages.

This feature can also be privacy relevant for finding your own messages in a busy channel if you later decide to delete them.

Operating system

Linux

Application version

1.11.8

How did you install the app?

flatpak from flathub

Homeserver

matrix.org

Will you send logs?

No

t3chguy commented 1 year ago

+user:home.server isn't a user identifier, @user:home.server is. + is the old sigil for denoting deprecated communities.

ell1e commented 1 year ago

Ah, my bad! I just tried that however, and that also gives zero results for myself in a place where I'm pretty sure I said something. I'd be nice if for a @user.home.server with displayname, all of the search terms 1. user, 2. @user, 3. @user:home.server and displayname if entered without typos or spacing would offer in some way to search for that user's messages.

t3chguy commented 1 year ago

Search for non-e2ee rooms is performed by the server, you'll likely need to raise your issue there

ell1e commented 1 year ago

Okay, so while I forwarded this ticket for the server-side for unencrypted chats, I tried in an E2EE chat and this is what happened there:

@user: no results

@user:home.server: an error message pops up: Index error: An invalid argument was passed: 'Query is invalid. SyntaxError'

displayname: no results

Expected results would be some superset that includes all messages of the user @user:home.server (who has the display name displayname).

gabrc52 commented 1 year ago

It would be useful to have the ability to search for messages sent by a given user, for example yourself. However, having to type a full username isn't very discoverable of a feature (and doesn't work yet).

https://playground.matrix.org/#post-/_matrix/client/v3/search

It is possible to perform this search according to the Matrix spec, but Element doesn't expose it.