<%! def mxc2url(mxc): serverName = mxc.split('/')[2] mediaId = mxc.split('/')[3] return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId %> <%def name="render(room)">
% if 'avatar_url' in room: % endif % if 'room_id' in room: % if 'children' not in room: % endif % if 'name' in room:
${room['name']}
% endif
% endif
% if 'children' in room:
% for subroom in room['children']: ${render(subroom)} % endfor
% endif
${render(s)}