aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/internal/helpers/helpers.go2
-rw-r--r--roomserver/internal/input/input_missing.go2
-rw-r--r--roomserver/internal/perform/perform_upgrade.go2
-rw-r--r--roomserver/internal/query/query_test.go4
-rw-r--r--roomserver/storage/shared/storage.go4
5 files changed, 7 insertions, 7 deletions
diff --git a/roomserver/internal/helpers/helpers.go b/roomserver/internal/helpers/helpers.go
index d5a54be5..ea0074fc 100644
--- a/roomserver/internal/helpers/helpers.go
+++ b/roomserver/internal/helpers/helpers.go
@@ -100,7 +100,7 @@ func IsServerCurrentlyInRoom(ctx context.Context, db storage.Database, serverNam
func IsInvitePending(
ctx context.Context, db storage.Database,
roomID, userID string,
-) (bool, string, string, *gomatrixserverlib.Event, error) {
+) (bool, string, string, gomatrixserverlib.PDU, error) {
// Look up the room NID for the supplied room ID.
info, err := db.RoomInfo(ctx, roomID)
if err != nil {
diff --git a/roomserver/internal/input/input_missing.go b/roomserver/internal/input/input_missing.go
index b849f1b3..89ba0756 100644
--- a/roomserver/internal/input/input_missing.go
+++ b/roomserver/internal/input/input_missing.go
@@ -856,7 +856,7 @@ func (t *missingStateReq) lookupEvent(ctx context.Context, roomVersion gomatrixs
return events[0].PDU, nil
}
}
- var event *gomatrixserverlib.Event
+ var event gomatrixserverlib.PDU
found := false
for _, serverName := range t.servers {
reqctx, cancel := context.WithTimeout(ctx, time.Second*30)
diff --git a/roomserver/internal/perform/perform_upgrade.go b/roomserver/internal/perform/perform_upgrade.go
index b4561ca8..2085fb37 100644
--- a/roomserver/internal/perform/perform_upgrade.go
+++ b/roomserver/internal/perform/perform_upgrade.go
@@ -473,7 +473,7 @@ func (r *Upgrader) sendInitialEvents(ctx context.Context, evTime time.Time, user
if i > 0 {
builder.PrevEvents = []gomatrixserverlib.EventReference{builtEvents[i-1].EventReference()}
}
- var event *gomatrixserverlib.Event
+ var event gomatrixserverlib.PDU
event, err = builder.AddAuthEventsAndBuild(userDomain, &authEvents, evTime, newVersion, r.Cfg.Matrix.KeyID, r.Cfg.Matrix.PrivateKey)
if err != nil {
return fmt.Errorf("failed to build new %q event: %w", builder.Type, err)
diff --git a/roomserver/internal/query/query_test.go b/roomserver/internal/query/query_test.go
index 61aee1ef..2ebf7f33 100644
--- a/roomserver/internal/query/query_test.go
+++ b/roomserver/internal/query/query_test.go
@@ -26,12 +26,12 @@ import (
// used to implement RoomserverInternalAPIEventDB to test getAuthChain
type getEventDB struct {
- eventMap map[string]*gomatrixserverlib.Event
+ eventMap map[string]gomatrixserverlib.PDU
}
func createEventDB() *getEventDB {
return &getEventDB{
- eventMap: make(map[string]*gomatrixserverlib.Event),
+ eventMap: make(map[string]gomatrixserverlib.PDU),
}
}
diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go
index de3ccbff..aa8e7341 100644
--- a/roomserver/storage/shared/storage.go
+++ b/roomserver/storage/shared/storage.go
@@ -543,7 +543,7 @@ func (d *EventDatabase) events(
}
sort.Sort(inputEventNIDs)
- events := make(map[types.EventNID]*gomatrixserverlib.Event, len(inputEventNIDs))
+ events := make(map[types.EventNID]gomatrixserverlib.PDU, len(inputEventNIDs))
eventNIDs := make([]types.EventNID, 0, len(inputEventNIDs))
for _, nid := range inputEventNIDs {
if event, ok := d.Cache.GetRoomServerEvent(nid); ok && event != nil {
@@ -593,7 +593,7 @@ func (d *EventDatabase) events(
return nil, err
}
if event := events[eventJSON.EventNID]; event != nil {
- d.Cache.StoreRoomServerEvent(eventJSON.EventNID, event)
+ d.Cache.StoreRoomServerEvent(eventJSON.EventNID, &types.HeaderedEvent{PDU: event})
}
}
results := make([]types.Event, 0, len(inputEventNIDs))