Add basic "federation" tests and some bugfixes

This commit is contained in:
Thomas Sileo
2018-05-26 09:50:59 +02:00
parent 6eb5d24f3e
commit fe46cb4317
7 changed files with 60 additions and 9 deletions

4
app.py
View File

@@ -760,6 +760,8 @@ def api_upload():
@api_required
def api_new_note():
source = request.args.get('content')
if not source:
raise ValueError('missing content')
content, tags = parse_markdown(source)
to = request.args.get('to')
cc = [ID+'/followers']
@@ -792,6 +794,8 @@ def api_stream():
@api_required
def api_follow():
actor = request.args.get('actor')
if not actor:
raise ValueError('missing actor')
if DB.following.find({'remote_actor': actor}).count() > 0:
return Response(status=201)