format instance name instead of inbox url
authorTristan Mahé <gled@remote-shell.net>
Wed, 31 Oct 2018 18:58:10 +0000 (11:58 -0700)
committerTristan Mahé <gled@remote-shell.net>
Wed, 31 Oct 2018 18:58:10 +0000 (11:58 -0700)
relay/default.py

index de2dc1e..172c9d3 100644 (file)
@@ -1,10 +1,11 @@
 import aiohttp.web
+import re
 from . import app, CONFIG
 from .database import DATABASE
 
 host = CONFIG['ap']['host']
 note = CONFIG['note']
-targets = '<br>'.join([target for target in DATABASE.get('relay-list', [])])
+targets = '<br>'.join([re.search('https://(.*)/inbox',target).group(1) for target in DATABASE.get('relay-list', [])])
 
 async def default(request):
     return aiohttp.web.Response(