Searching for messages with `from:xxx` giving no results for my username
I tried to search for the my messages using from:antonioaltamura
in https://gitter.im/gitterHQ/gitter but no results are returned.
I do have messages in that room such as:
- timeout
- search
- from syntax
Workaround
Since the Gitter search is full Elasticsearch syntax, you can try using fromUserId:5c40d41ad73408ce4fb51ea9
and seems to be more reliable.
You can find someone's userId
by inspecting their avatar with the browser devtools and looking for the avatar-5c40d41ad73408ce4fb51ea9
class.
<div class="trpDisplayPicture avatar-5c40d41ad73408ce4fb51ea9 avatar-s " aria-label="Daniel Nicolai">
<img src="https://avatars0.githubusercontent.com/u/18429791?v=4&s=30" srcset="https://avatars0.githubusercontent.com/u/18429791?v=4&s=60 2x" height="30" width="30" class="avatar__image" alt="" aria-label="Daniel Nicolai">
</div>
Relevant code
- https://gitlab.com/gitlab-org/gitter/webapp/blob/a416606a9b2b31c63f76c0fdc238ffaf0a231dec/modules/chats/lib/chat-search-service.js#L11-42
- https://gitlab.com/gitlab-org/gitter/webapp/blob/a416606a9b2b31c63f76c0fdc238ffaf0a231dec/modules/elasticsearch/lib/chats-for-room-search.js#L37-49
You won't be able to debug this locally until https://gitlab.com/gitlab-org/gitter/webapp/issues/1919 is fixed though