aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/directory.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/routing/directory.go')
-rw-r--r--clientapi/routing/directory.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go
index a8bf019b..11ae5739 100644
--- a/clientapi/routing/directory.go
+++ b/clientapi/routing/directory.go
@@ -291,7 +291,7 @@ func SetVisibility(
}
// NOTSPEC: Check if the user's power is greater than power required to change m.room.canonical_alias event
- power, _ := gomatrixserverlib.NewPowerLevelContentFromEvent(queryEventsRes.StateEvents[0].Event)
+ power, _ := gomatrixserverlib.NewPowerLevelContentFromEvent(queryEventsRes.StateEvents[0].PDU)
if power.UserLevel(dev.UserID) < power.EventLevel(spec.MRoomCanonicalAlias, true) {
return util.JSONResponse{
Code: http.StatusForbidden,