actor: don't relay non-public messages
This commit is contained in:
parent
0405b0463b
commit
03e096a839
|
@ -144,9 +144,12 @@ async def handle_create(actor, data, request):
|
||||||
if check_reqs(content, actor):
|
if check_reqs(content, actor):
|
||||||
return
|
return
|
||||||
|
|
||||||
# fetch our IRC bot
|
# check that the message is public before relaying
|
||||||
bot = get_irc_bot()
|
public_uri = 'https://www.w3.org/ns/activitystreams#Public'
|
||||||
bot.relay_message(actor, data['object'], ' '.join(content))
|
|
||||||
|
if public_uri in data.get('to', []) or public_uri in data.get('cc', []):
|
||||||
|
bot = get_irc_bot()
|
||||||
|
bot.relay_message(actor, data['object'], ' '.join(content))
|
||||||
|
|
||||||
|
|
||||||
async def handle_follow(actor, data, request):
|
async def handle_follow(actor, data, request):
|
||||||
|
|
Loading…
Reference in a new issue