Skip to content

Commit

Permalink
hack fix #164
Browse files Browse the repository at this point in the history
References: #164
JacksonChen666 committed Jan 22, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3636a85 commit 993b172
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions synadm/api.py
Original file line number Diff line number Diff line change
@@ -852,8 +852,9 @@ def room_power_levels(self, from_, limit, name, order_by, reverse,
room_id (string): If left out, all rooms are fetched.
Returns:
string: JSON string containing the Admin API's response or None if
an exception occured. See Synapse Admin API docs for details.
string or None: JSON string containing the Admin API's response
or None if an exception occured. See Synapse Admin API docs
for details.
"""
if room_id:
# We use the "name search" possibility of the room list API to get
@@ -862,6 +863,9 @@ def room_power_levels(self, from_, limit, name, order_by, reverse,
else:
rooms = self.room_list(from_, limit, name, order_by, reverse)

if rooms is None:
return None

rooms_w_power_count = 0
for i, room in enumerate(rooms["rooms"]):
rooms["rooms"][i]["power_levels"] = {}

0 comments on commit 993b172

Please sign in to comment.