dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

Edited messages appear twice in fulltext search

Open S7evinK opened this issue 10 months ago • 2 comments

When a message is edited, they appear twice in the results of /search. While Element Web seems to aggregate the results and only returns one results, Element Android returns both. This may be a bit confusing.

IMO, Dendrite should only return the latest message.

The responsible code for this: https://github.com/matrix-org/dendrite/blob/14a6c100977be6484eec419fdc8f496eb27b0677/syncapi/consumers/roomserver.go#L593-L627

We'd need to check if m.relates.to in content contains a rel_type of m.replace and then delete the event_id from the fulltext index before indexing the new event.

S7evinK avatar Apr 09 '24 17:04 S7evinK

Hi! I'd like to take this.

adnull avatar Apr 17 '24 15:04 adnull

Sure, go for it! :)

S7evinK avatar Apr 18 '24 06:04 S7evinK

Fixed with #3363.

S7evinK avatar Jul 27 '24 20:07 S7evinK