element-hq / element-hq/synapse
Synapse is a bit confused when searching for messages which have been edited
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#8686](https://github.com/matrix-org/synapse/issues/8686).
---
- Create an unencrypted room
- Send a message `foo`
- Search for `foo` (POST https://matrix-client.matrix.org/_matrix/client/r0/search) -> 1 result OK
- Edit the message from `foo` to `bar`
- Search for `bar` -> 1 result (`bar`) -> OK
- Search for `foo` -> 1 result (`bar`) -> KO
In Element Web:

Another scenario:
- Send a message `foo test`
- Search for `test` (POST https://matrix-client.matrix.org/_matrix/client/r0/search) -> 1 result OK
- Edit the message from `foo test` to `bar test`
- Search for `test` -> 2 results -> KO
I'm not sure about what is the proper fix, but I guess Synapse should only return the latest version of a message, and only if it contains the searched terms.
Contributor guide
Assessment
This issue has not been assessed yet.