aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/sendevent_test.go
diff options
context:
space:
mode:
authorAlex <d.lexand@gmail.com>2024-07-27 22:30:17 +0200
committerGitHub <noreply@github.com>2024-07-27 22:30:17 +0200
commit989795973103c463a33f053663c6a8616177186c (patch)
tree1f37145cbbd48fb75d3e8bfa4785ab6fa8e2832a /clientapi/routing/sendevent_test.go
parentaffb6977e43ad5051761d0de650370f421f751b5 (diff)
Fix: Edited messages appear twice in fulltext search (#3363)
As stated in https://github.com/matrix-org/dendrite/issues/3358 the search response contains both original and edited message. This PR fixes it by removing of the original message from the fulltext index after indexing the edit message event. I also made some cosmetic changes/fixes i found in the code Signed-off-by: `Alexander Dubovikov <d.lexand@gmail.com>`
Diffstat (limited to 'clientapi/routing/sendevent_test.go')
-rw-r--r--clientapi/routing/sendevent_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/clientapi/routing/sendevent_test.go b/clientapi/routing/sendevent_test.go
index 9cdd7535..00d19154 100644
--- a/clientapi/routing/sendevent_test.go
+++ b/clientapi/routing/sendevent_test.go
@@ -265,7 +265,7 @@ func createEvents(eventsJSON []string, roomVer gomatrixserverlib.RoomVersion) ([
for i, eventJSON := range eventsJSON {
pdu, evErr := roomVerImpl.NewEventFromTrustedJSON([]byte(eventJSON), false)
if evErr != nil {
- return nil, fmt.Errorf("failed to make event: %s", err.Error())
+ return nil, fmt.Errorf("failed to make event: %s", evErr.Error())
}
ev := types.HeaderedEvent{PDU: pdu}
events[i] = &ev