AP: blindly accept all Accepts

#21
pull/43/head
Ryan Barrett 2018-10-24 21:44:21 -07:00
rodzic 2bb418dc72
commit 1c41aa4fd0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -18,6 +18,7 @@ from models import Follower, MagicKey, Response
from httpsig.requests_auth import HTTPSignatureAuth
SUPPORTED_TYPES = (
'Accept',
'Announce',
'Article',
'Audio',
@ -111,9 +112,11 @@ class InboxHandler(webapp2.RequestHandler):
obj = {'id': obj}
type = activity.get('type')
if type == 'Accept': # eg in response to a Follow
return # noop
if type == 'Create':
type = obj.get('type')
if type not in SUPPORTED_TYPES:
elif type not in SUPPORTED_TYPES:
common.error(self, 'Sorry, %s activities are not supported yet.' % type,
status=501)