AP => webmention: fetch actor for all activity types, including replies

fixes #41
create
Ryan Barrett 2018-11-15 07:02:36 -08:00
rodzic 777a62208d
commit 1c728f6590
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -20,6 +20,7 @@ First, install the [Google Cloud SDK](https://cloud.google.com/sdk/gcloud/) (aka
Once you've done that, run this to find the App Engine libraries directory:
```sh
STATE instead use Installation Root: [/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk]
gcloud info | grep -o -E '/[^:]+google_appengine'
```

Wyświetl plik

@ -123,11 +123,10 @@ class InboxHandler(webapp2.RequestHandler):
# TODO: verify signature if there is one
# fetch actor if necessary so we have name, profile photo, etc
if type in ('Announce', 'Like', 'Follow'):
for elem in obj, activity:
actor = elem.get('actor')
if actor and isinstance(actor, basestring):
elem['actor'] = common.get_as2(actor).json()
for elem in obj, activity:
actor = elem.get('actor')
if actor and isinstance(actor, basestring):
elem['actor'] = common.get_as2(actor).json()
activity_unwrapped = common.redirect_unwrap(activity)
if type == 'Follow':