Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edited messages appear twice in fulltext search #3358

Closed
matrixbot opened this issue Nov 2, 2024 · 3 comments
Closed

Edited messages appear twice in fulltext search #3358

matrixbot opened this issue Nov 2, 2024 · 3 comments
Labels
good first issue Good for newcomers T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @S7evinK at matrix-org/dendrite#3358.

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.

@matrixbot matrixbot added good first issue Good for newcomers T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Nov 2, 2024
@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @adnull at matrix-org/dendrite#3358 (comment).

Hi! I'd like to take this.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3358 (comment).

Sure, go for it! :)

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#3358 (comment).

Fixed with #3363.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

1 participant