From 0eac7077c9e6049a86c6fb05ab127ffc84cf7315 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 3 Sep 2019 09:01:30 -0600 Subject: [PATCH] Ensure an auth instance is available to ListMediaInRoom (#5967) * Ensure an auth instance is available to ListMediaInRoom Fixes https://github.com/matrix-org/synapse/issues/5737 * Changelog --- changelog.d/5967.bugfix | 1 + synapse/rest/admin/media.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/5967.bugfix diff --git a/changelog.d/5967.bugfix b/changelog.d/5967.bugfix new file mode 100644 index 0000000000..8d7bf5c2e9 --- /dev/null +++ b/changelog.d/5967.bugfix @@ -0,0 +1 @@ +Fix list media admin API always returning an error. diff --git a/synapse/rest/admin/media.py b/synapse/rest/admin/media.py index f3f63f0be7..ed7086d09c 100644 --- a/synapse/rest/admin/media.py +++ b/synapse/rest/admin/media.py @@ -60,6 +60,7 @@ class ListMediaInRoom(RestServlet): def __init__(self, hs): self.store = hs.get_datastore() + self.auth = hs.get_auth() @defer.inlineCallbacks def on_GET(self, request, room_id):