Ryan Barrett
a4b309afef
activitypub: refactor Accept response to Follow activity
...
...and get tests working. #21
2018-10-21 15:28:42 -07:00
Ryan Barrett
ed3a685831
accept AP follow requests: original patch from @swentel
...
...from https://github.com/snarfed/bridgy-fed/issues/21#issuecomment-430403595
2018-10-19 06:50:00 -07:00
Ryan Barrett
9fc47c8ba9
AP => wm: switch to proxying reply wm source, unwrap URLs
...
for #35
example: https://webmention.io/realize.be/webmention/hG654HOgobymY54pMaNS
2018-10-17 17:49:56 -07:00
Ryan Barrett
0b951d6570
add noop handler for /superfeedr/* that just logs the request
...
for #18
2018-10-17 14:39:25 -07:00
Ryan Barrett
27e56396b8
AP => wm: remove our redirect from target URLs
...
fixes the second half of #35
2018-10-17 12:00:38 -07:00
Ryan Barrett
9fb7f2fe26
AP => wm: prefer object URL for webmention source if available
...
fixes half of #35
2018-10-17 11:52:34 -07:00
Ryan Barrett
eea19045ff
wm => AP: drop warning on 202 response, now that mastodon is fixed
...
for #16
2018-10-17 07:41:41 -07:00
Ryan Barrett
dfe9479838
yet another circle fix
2018-10-16 11:55:50 -07:00
swentel
9557216789
Add link to Drupal
2018-10-16 11:49:25 -07:00
Ryan Barrett
6503045225
fix flaky test failure from importing webutil.testutil_appengine
...
eg https://circleci.com/gh/snarfed/bridgy-fed/164
```
testutil_appengine (unittest.loader.ModuleImportFailure) ... ERROR
...
======================================================================
ERROR: testutil_appengine (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: testutil_appengine
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
__import__(name)
File "/tmp/oauth-dropins/oauth_dropins/webutil/testutil_appengine.py", line 4, in <module>
from google.appengine.datastore import datastore_stub_util
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/datastore/datastore_stub_util.py", line 69, in <module>
from google.appengine.datastore import datastore_stub_index
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/datastore/datastore_stub_index.py", line 45, in <module>
import yaml
ImportError: No module named yaml
```
2018-10-16 11:44:54 -07:00
Ryan Barrett
25d2724700
add Mention tag for Mastodon replies
...
fixes #34 . thanks @swentel!
2018-10-16 11:38:12 -07:00
Ryan Barrett
a0f6f669b7
circle: omit tests, etc from coverage
2018-10-16 11:00:40 -07:00
Ryan Barrett
2ffd10306f
AP => webmention: handle full AS2 activities
...
mastodon used to send bare objects for lots of things, e.g. replies, but now sends ful AS2 Create activities with embedded objects much more often. handle those too.
thanks for the nudge @swentel!
2018-10-15 11:52:11 -07:00
Ryan Barrett
b25960ca93
wrap activity ids and urls and actor ids in our /r/ endpoint
...
for #16 , #32 . cc @swentel.
2018-10-14 07:58:17 -07:00
Ryan Barrett
e720e543d8
add /r/ redirect endpoint
...
for #16 , #32 . cc @swentel. more to come.
2018-10-14 07:42:28 -07:00
Ryan Barrett
118f8380c7
fix tests for yet another parser change that dropped implied u-url
2018-10-11 17:16:06 -07:00
Ryan Barrett
5047337738
upgrade BS4 to 4.6.3, pin lxml to app engine prod's version
2018-10-11 17:03:26 -07:00
Ryan Barrett
6681a5f2c7
fix unit test failure triggered by newer versions of mf2py or BS4 or ...
...
problem is that explicit p-name includes `<img>` `src` value, but implicit doesn't. background in https://github.com/microformats/microformats2-parsing/issues/35 etc.
```
======================================================================
FAIL: test_activitypub_create_author_only_url (tests.test_webmention.WebmentionTest)
Mf2 author property is just a URL. We should run full authorship.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ryan/src/bridgy-fed/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "tests/test_webmention.py", line 383, in test_activitypub_create_author_only_url
self.assert_equals(repost_as2, kwargs['json'])
File "/Users/ryan/src/bridgy-fed/local/lib/python2.7/site-packages/oauth_dropins/webutil/testutil.py", line 182, in assert_equals
%s""" % (msg, ''.join(e.args), expected, actual))
AssertionError: None: [actor] [name] u'Ms. \u2615 Baz' != u'Ms. \u2615 Baz http://orig/pic '
- Ms. \u2615 Baz
+ Ms. \u2615 Baz http://orig/pic
Expected value:
{u'@context': u'https://www.w3.org/ns/activitystreams ',
u'actor': {u'icon': ({u'type': u'Image', u'url': u'http://orig/pic '},),
u'id': u'http://localhost/orig ',
u'image': ({u'type': u'Image', u'url': u'http://orig/pic '},),
u'name': u'Ms. \u2615 Baz',
u'preferredUsername': u'orig',
u'type': u'Person',
u'url': u'http://orig '},
u'cc': [u'https://www.w3.org/ns/activitystreams#Public ',
u'http://orig/author ',
u'http://orig/recipient ',
u'http://orig/bystander '],
u'id': u'http://a/repost ',
u'name': u'reposted!',
u'object': u'tag:orig,2017:as2',
u'type': u'Announce',
u'url': u'http://a/repost '}
Actual value:
{u'@context': u'https://www.w3.org/ns/activitystreams ',
u'actor': {u'icon': [{u'type': u'Image', u'url': u'http://orig/pic '}],
u'id': u'http://localhost/orig ',
u'image': [{u'type': u'Image', u'url': u'http://orig/pic '}],
u'name': u'Ms. \u2615 Baz http://orig/pic ',
u'preferredUsername': u'orig',
u'type': u'Person',
u'url': u'http://orig '},
u'cc': [u'https://www.w3.org/ns/activitystreams#Public ',
u'http://orig/author ',
u'http://orig/recipient ',
u'http://orig/bystander '],
u'id': u'http://a/repost ',
u'name': u'reposted!',
u'object': u'tag:orig,2017:as2',
u'type': u'Announce',
u'url': u'http://a/repost '}
```
2018-10-11 16:56:55 -07:00
Ryan Barrett
b8d52b3dac
move test/ => tests/ to avoid shadowing python's built in test module
...
fixes confusing problems with dev_appserver starting in cloud sdk 219 (app-engine-python 1.9.76). background in https://issuetracker.google.com/issues/117145272#comment25 .
2018-10-11 16:07:53 -07:00
Ryan Barrett
2854b08862
migrate to circleci 2.0
...
https://circleci.com/docs/2.0/
2018-09-20 18:21:06 -07:00
Ryan Barrett
3485cc31b7
bump a few dependency versions
2018-09-20 18:17:14 -07:00
Ryan Barrett
60c5267beb
update docs to better handle gcloud SDK
...
thanks for your patience @swentel!
2018-09-20 13:24:43 -07:00
Ryan Barrett
acaa28ef13
app.yaml: use includes to reuse builtins and skip_files from webutil
...
https://cloud.google.com/appengine/docs/standard/python/config/appref#Python_app_yaml_Includes
2018-04-30 06:39:22 -07:00
Ryan Barrett
5257099bfa
Merge pull request #27 from singpolyma/custom-username
...
Use the acct: URI for this domain, if in h-card
2018-04-16 10:43:51 -07:00
Stephen Paul Weber
38ff56e3cc
Use the acct: URI for this domain, if in h-card
...
This allows users to choose their own username for their webfinger ID.
Closes #3
2018-04-16 11:10:03 -05:00
Ryan Barrett
6815807298
only email me on successful webmentions, not all
2018-04-02 09:36:09 -07:00
Ryan Barrett
bf71c5fe2c
webmention: handle source page with no mf2
...
fixes https://console.cloud.google.com/errors/CNixlrul4YPdMw
2018-03-27 14:04:48 -07:00
Ryan Barrett
0499823b05
tell circle we need mox3
2018-03-24 21:15:47 -07:00
Ryan Barrett
8c3797c39d
fix tests for new granary newline handling in snarfed/granary#130
2018-03-24 21:02:49 -07:00
Ryan Barrett
0d05dfe51d
bump granary dependency to 1.12
2018-03-24 21:01:59 -07:00
Ryan Barrett
b330ed9f3e
web: remove unnecessary h-card from link to my site
...
it was distracting Loqi in #indieweb etc
2018-03-20 10:55:07 -07:00
Ryan Barrett
32757ca65e
update tests to handle granary trimming content whitespace
...
snarfed/granary@ec1d415861
2018-02-02 10:01:15 -08:00
Ryan Barrett
d0ecc4cc66
don't email me for my own posts
2018-02-02 10:01:00 -08:00
Ryan Barrett
1e111547e4
run full mf2 authorship algorithm when necessary
...
like for https://aaronparecki.com/2018/01/11/4/
2018-01-12 09:30:27 -08:00
Ryan Barrett
d9eb56da55
add test for simple string-only author properties
...
like @aaronpk's in https://aaronparecki.com/2018/01/11/4/ . actual bug fix is snarfed/granary@a530afe08d
2018-01-11 10:52:44 -08:00
Ryan Barrett
f8dca4c7d1
upgrade Jinja2 from 2.6 to 2.10 for a security patch
...
thanks for reporting @VersionEye!
https://www.versioneye.com/user/projects/5a1c7e860fb24f21d9970c00
2018-01-04 11:03:33 -08:00
Ryan Barrett
78064865c0
don't email me on webmentions from localhost :P
2017-12-26 20:15:28 -08:00
Ryan Barrett
be2ea6ad28
webmention: if u-url is missing, default to source url
...
AS2 id, which is required for ActivityPub, comes from u-url, so we always need one.
fixes #20
2017-12-12 18:07:12 -08:00
Ryan Barrett
a67e44f110
add requirements.freeze.text for requires.io
2017-11-28 13:43:21 -08:00
Ryan Barrett
d0ac9246a8
granary-demo.appspot.com
2017-11-25 15:42:53 -08:00
Ryan Barrett
da4873fc64
activitypub: cc all original recipients (in to and cc)
2017-11-05 15:50:23 -08:00
Ryan Barrett
2c2654d1f8
docs: details on advertising websub hub in atom
2017-10-27 07:27:57 -07:00
Ryan Barrett
dcc6b9d23b
minor tweak to fix /log
2017-10-26 17:31:40 -07:00
Ryan Barrett
29fb93ca92
change username from 'me' to web site domain
...
for #3 , tootsuite/mastodon#5523
2017-10-26 17:07:57 -07:00
Ryan Barrett
92798bc434
webmention: refactor storing Responses so we can do it earlier
2017-10-26 12:31:04 -07:00
Ryan Barrett
98cc01d6ae
fix /responses template for jinja 2.6
...
...since that's what's on app engine. https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27
2017-10-26 11:10:29 -07:00
Ryan Barrett
07c650b9e1
add /log handler, link to it from /responses
...
reuses LogHandler newly moved from bridgy to webutil in snarfed/webutil@a49b3af4d1
2017-10-26 09:32:17 -07:00
Ryan Barrett
22ca3e64a6
add /responses page with links to raw logs
...
log handler itself is next.
2017-10-25 18:33:11 -07:00
Ryan Barrett
cf1f4122ec
log more json response bodies
2017-10-24 18:31:13 -07:00
Ryan Barrett
a1a66c2f24
fix logging for failed outbound HTTP requests
...
also disable logging full parsed mf2 in activitypub actor handler.
2017-10-24 18:27:07 -07:00