aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/query/query_test.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-02-24 09:40:20 +0100
committerGitHub <noreply@github.com>2023-02-24 09:40:20 +0100
commitad07b169b8a58b5a843b7b19ff0a989399d0aea0 (patch)
tree8904e5e52ecec90aa94f748c10a08b08cdf01de1 /roomserver/internal/query/query_test.go
parente6aa0955ff4113114ff8f30073582cc4ecc454fa (diff)
Refactor `StoreEvent` and create a new `RoomDatabase` interface (#2985)
This PR changes a few things: - It pulls out the creation of several NIDs from the `StoreEvent` function to make the functions more reusable - Uses more caching when using those NIDs to avoid DB round trips
Diffstat (limited to 'roomserver/internal/query/query_test.go')
-rw-r--r--roomserver/internal/query/query_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/roomserver/internal/query/query_test.go b/roomserver/internal/query/query_test.go
index 03627ea9..16761157 100644
--- a/roomserver/internal/query/query_test.go
+++ b/roomserver/internal/query/query_test.go
@@ -80,7 +80,7 @@ func (db *getEventDB) addFakeEvents(graph map[string][]string) error {
}
// EventsFromIDs implements RoomserverInternalAPIEventDB
-func (db *getEventDB) EventsFromIDs(ctx context.Context, eventIDs []string) (res []types.Event, err error) {
+func (db *getEventDB) EventsFromIDs(ctx context.Context, roomNID types.RoomNID, eventIDs []string) (res []types.Event, err error) {
for _, evID := range eventIDs {
res = append(res, types.Event{
EventNID: 0,