Compare commits
7 commits
sqldatabas
...
master
Author | SHA1 | Date | |
---|---|---|---|
pch_xyz | 8d5b097ac4 | ||
pch_xyz | 8c49d92aea | ||
pch_xyz | d06f51fca6 | ||
pch_xyz | 818a3573ae | ||
pch_xyz | 3dea5c030b | ||
15b1324df2 | |||
006efc1ba4 |
|
@ -11,12 +11,12 @@ cache = LRUCache(1024)
|
||||||
|
|
||||||
|
|
||||||
def person_check(actor, software):
|
def person_check(actor, software):
|
||||||
## pleroma and akkoma use Person for the actor type for some reason
|
## pleroma and akkoma may use Person for the actor type for some reason
|
||||||
if software in {'akkoma', 'pleroma'} and actor.id != f'https://{actor.domain}/relay':
|
if software in {'akkoma', 'pleroma'} and actor.id == f'https://{actor.domain}/relay':
|
||||||
return True
|
return False
|
||||||
|
|
||||||
## make sure the actor is an application
|
## make sure the actor is an application
|
||||||
elif actor.type != 'Application':
|
if actor.type != 'Application':
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ async def home(request):
|
||||||
|
|
||||||
text = f"""
|
text = f"""
|
||||||
<html><head>
|
<html><head>
|
||||||
<title>ActivityPub Relay at {host}</title>
|
<title>SEDI中繼器</title>
|
||||||
<style>
|
<style>
|
||||||
p {{ color: #FFFFFF; font-family: monospace, arial; font-size: 100%; }}
|
p {{ color: #FFFFFF; font-family: monospace, arial; font-size: 100%; }}
|
||||||
body {{ background-color: #000000; }}
|
body {{ background-color: #000000; }}
|
||||||
|
@ -53,9 +53,12 @@ a:hover {{ color: #8AF; }}
|
||||||
<body>
|
<body>
|
||||||
<p>This is an Activity Relay for fediverse instances.</p>
|
<p>This is an Activity Relay for fediverse instances.</p>
|
||||||
<p>{note}</p>
|
<p>{note}</p>
|
||||||
<p>You may subscribe to this relay with the address: <a href="https://{host}/actor">https://{host}/actor</a></p>
|
<p>Misskey及Mastodon站長請訂閱這個地址:<a href="https://{host}/inbox">https://{host}/inbox</a></p>
|
||||||
<p>To host your own relay, you may download the code at this address: <a href="https://git.pleroma.social/pleroma/relay">https://git.pleroma.social/pleroma/relay</a></p>
|
<p>Pleroma及Friendica站長請訂閱這個地址:<a href="https://{host}/actor">https://{host}/actor</a></p>
|
||||||
<br><p>List of {count} registered instances:<br>{targets}</p>
|
<p>原始碼:<a href="https://git.seediqbale.xyz/pch_xyz/sedi-relay">https://git.seediqbale.xyz/pch_xyz/sedi-relay</a></p>
|
||||||
|
<p>請我喝杯咖啡:<a href="https://buymeacoffee.com/SEDI">https://buymeacoffee.com/SEDI</a></p>
|
||||||
|
<p>activityrelay v0.2.4</p>
|
||||||
|
<br><p>有 {count} 個實例訂閱中:<br>{targets}</p>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
|
|
||||||
return Response.new(text, ctype='html')
|
return Response.new(text, ctype='html')
|
||||||
|
|
Loading…
Reference in a new issue