mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-09 23:23:10 -06:00
Fix nil map bugs (by initialising maps)
This commit is contained in:
parent
8642e69568
commit
8416059391
|
|
@ -34,7 +34,9 @@ type RoomHierarchyPaginationCache struct {
|
|||
}
|
||||
|
||||
func NewRoomHierarchyPaginationCache() RoomHierarchyPaginationCache {
|
||||
return RoomHierarchyPaginationCache{}
|
||||
return RoomHierarchyPaginationCache{
|
||||
cache: map[string]roomserverAPI.CachedRoomHierarchyWalker{},
|
||||
}
|
||||
}
|
||||
|
||||
func (c *RoomHierarchyPaginationCache) Get(token string) roomserverAPI.CachedRoomHierarchyWalker {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ func (r *Queryer) QueryRoomHierarchy(ctx context.Context, caller types.DeviceOrS
|
|||
parentRoomID: "",
|
||||
depth: 0,
|
||||
}},
|
||||
processed: stringSet{},
|
||||
}
|
||||
|
||||
return &walker
|
||||
|
|
|
|||
Loading…
Reference in a new issue