<%! 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 'children' in room: % for subroom in room['children']: % endfor % else: % if 'room_id' in room: % endif % endif
${room['name']}
${render(subroom)}
% if 'name' in room:
${room['name']}
% endif
${render(s)}