diff --git a/syncapi/routing/search.go b/syncapi/routing/search.go index 7b832e26a..04019d637 100644 --- a/syncapi/routing/search.go +++ b/syncapi/routing/search.go @@ -121,8 +121,12 @@ func Search(req *http.Request, device *api.Device, syncDB storage.Database, fts eventScore[hit.ID] = hit } + // Filter on m.room.message, as otherwise we also get events like m.reaction + // which "breaks" displaying results in Element Web. + types := []string{"m.room.message"} roomFilter := &gomatrixserverlib.RoomEventFilter{ Rooms: &rooms, + Types: &types, } evs, err := syncDB.Events(ctx, wantEvents)