Ryan Barrett
e423bde6d0
unify logging for writing datastore entities into post put hook
...
and other logging tweaks
2023-02-14 15:38:42 -08:00
Ryan Barrett
588598c5ff
switch most uses of common.get_as2 to common.get_object
2023-02-14 14:56:27 -08:00
Ryan Barrett
c2e6174330
add common.get_object()
2023-02-14 14:30:00 -08:00
Ryan Barrett
c12bb6db6d
serve AS2 /[domain] actors from datastore instead of refetching h-card
...
for #392 . not pretty, but gets the job done. more code cleanup needed eventually.
2023-02-14 08:25:41 -08:00
Ryan Barrett
6446c8c421
convert Object.type and .object_ids to ComputedPropertys
...
https://googleapis.dev/python/python-ndb/latest/model.html#google.cloud.ndb.model.ComputedProperty
2023-02-13 21:43:49 -08:00
Ryan Barrett
46ab1cfdf7
AP inbox: simplify already-seen-id handling
2023-02-13 19:10:01 -08:00
Ryan Barrett
e39a92cee2
optimize AP inbox delivery by moving user load back further down
2023-02-13 11:25:33 -08:00
Ryan Barrett
c305dcc8d5
AP inbox delivery: cache activity ids that we've already seen in memory
...
for #411
2023-02-12 22:17:04 -08:00
Ryan Barrett
7a625c5a02
AP inbox delivery: short circuit out if we've already seen the activity id
...
for #411 . next is caching in memory.
2023-02-12 21:58:59 -08:00
Ryan Barrett
bf97c1af4f
store all incoming AP activities in Objects
2023-02-11 22:53:50 -08:00
Ryan Barrett
3feb44e414
apply AP Updates to stored Objects in datastore
...
for #409
2023-02-11 22:23:01 -08:00
Ryan Barrett
7e2fbd1ed0
make AP Deletes mark stored Objects deleted
...
for #409
2023-02-11 21:47:55 -08:00
Ryan Barrett
45fc9786a2
activitypub: fetch full objects of reposts so we can render them in feeds
...
for #419
2023-02-11 19:58:07 -08:00
Ryan Barrett
cb66a2f33b
fix delivering reposts to followers
...
evidently broken by #286 . fixes #418
2023-02-08 11:03:54 -08:00
Ryan Barrett
b739bd4cee
return 404 on requests for unknown users instead of automatically creating them
2023-02-07 18:28:52 -08:00
Ryan Barrett
532ccb8ac1
Activity => Object: use StructuredProperty for Object.delivered etc, add protocol
...
#286
ndb implements StructuredProperty by hoisting each nested property into a
corresponding property on the parent entity, prefixed by the StructuredProperty's
name, eg delivered.uri, delivered.protocol, etc.
For repeated StructuredPropertys, the hoisted properties are all repeated on the
parent entity, and reconstructed into StructuredPropertys based on their order.
https://googleapis.dev/python/python-ndb/latest/model.html#google.cloud.ndb.model.StructuredProperty
2023-02-04 20:46:27 -08:00
Ryan Barrett
f9891b6ef7
Activity => Object: add activity label, unify Objects for AP => wm
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
4d2fcdd76f
Activity => Object: fully populate labels, source_protocol webmention
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
97ffc10f72
Activity => Object: populate Object.object_ids property
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
eafba6d7cd
Activity => Object: populate Object.type
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
060ad96752
Activity => Object: update activitypub.py
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
d724ae8cba
accept Updates to Person objects, do nothing with them
...
fixes #387
2023-01-25 19:44:48 -08:00
Ryan Barrett
d85ffaec04
implement stub empty outbox
...
for #383
2023-01-25 13:12:24 -08:00
Ryan Barrett
55d5206188
cache 502s and 504s for requests that fetch users' sites
...
for #378
2023-01-24 16:29:19 -08:00
Ryan Barrett
bb2d3e03de
noop: convert a few %s'es to f-strings
...
thanks flynt! https://github.com/ikamensh/flynt
2023-01-24 12:17:24 -08:00
Ryan Barrett
1627ff667a
translate webmention from home page into profile (actor) Update
...
for #376 , #331
2023-01-23 16:09:25 -08:00
Ryan Barrett
af769de99e
implement rest of followers/following collections
...
for #264
2023-01-20 07:02:55 -08:00
Ryan Barrett
74ebbc428b
add new common.fetch_followers() fn, use in UI, AP collections, and XRPCs
...
for #264
2023-01-19 15:29:52 -08:00
Ryan Barrett
fc4e8b11d2
return actors in AP Followers/Following collections
...
for #264 . next: paging
2023-01-19 07:00:35 -08:00
Ryan Barrett
84606500fa
refactoring: unify followers and following AP collection endpoints
2023-01-18 20:32:23 -08:00
Ryan Barrett
6520331627
incoming Follows: synthesize url into follow object stored in Activity
...
rendered mf2 HTML proxy pages (in render.py) fall back to redirecting to the follow's AS2 id field, but Mastodon's ids are URLs that don't load in browsers, eg https://jawns.club/ac33c547-ca6b-4351-80d5-d11a6879a7b0 . so, set a synthetic URL based on the follower's profile. fixes #336
2023-01-12 12:28:34 -08:00
Ryan Barrett
4e539488a7
inbound AP: handle Undo Follow with composite inner object
2023-01-09 22:58:35 -08:00
Ryan Barrett
8cdc5ecc4c
inbound AP: handle Follow with composite object
2023-01-08 17:41:15 -08:00
Ryan Barrett
9bb82e6db3
follow UI: store last_follow, misc bug fixes
2023-01-08 12:03:56 -08:00
Ryan Barrett
aa0dcbb222
noop: drop content type constants in common, use granary's instead
2023-01-06 21:01:33 -08:00
Ryan Barrett
7ac1006021
background task bug fix: override task runner host
...
we were using request.host_url blindly, which was fed.brid.gy for user-facing requests, but bridgy-federated.uc.r.appspot.com for tasks. #335
2023-01-05 15:05:35 -08:00
Ryan Barrett
4c383a3037
request caching tweaks, webfinger, use new flask_util.cached headers kwarg
2022-12-26 13:34:50 -08:00
Ryan Barrett
dc9c699d4f
/inbox: wait until later to load user from datastore
...
optimizes Accepts and Deletes sent to individual inbox that don't need the user
2022-12-08 09:00:53 -08:00
Ryan Barrett
a95c2c4b55
incoming follow bug fix, handle www and use_instead
...
fixes #314
2022-12-06 14:09:44 -08:00
Ryan Barrett
0363db65fa
handle new multi-valued url field in AS2 objects
...
snarfed/granary@79c512402b
2022-11-30 21:04:41 -08:00
Ryan Barrett
ab834f586a
incoming AP Follow bug fix, reactivate if Follower exists and is inactive
...
thanks again @gregorLove!
2022-11-29 22:43:11 -08:00
Ryan Barrett
559f02ad1d
AP actor handler: handle bad domain
...
https://console.cloud.google.com/errors/detail/CKGv-b6impW3Jg;time=P30D?project=bridgy-federated
2022-11-28 17:27:55 -08:00
Ryan Barrett
2fdc6f29a9
sign HTTP GET requests for AS2 objects
...
to support Mastodon's AUTHORIZED_FETCH aka secure mode: https://docs.joinmastodon.org/admin/config/#authorized_fetch
fixes #291
2022-11-24 09:41:14 -08:00
Ryan Barrett
2279db46fc
start on AP followers/following collections
...
for #264
2022-11-21 18:47:08 -08:00
Ryan Barrett
01cb91d542
handle actor Deletes that get sent to shared inbox
...
...by actually deleting the corresponding Follower entities. fixes #284
2022-11-21 12:14:37 -08:00
Ryan Barrett
2d07ac358d
move activitypub.actor() to common so I can reuse it
2022-11-18 18:49:34 -08:00
Ryan Barrett
d0c16d8849
bug fix, use https://fed.brid.gy/[domain] as actor id, not bare domain
...
fixes #293
2022-11-17 16:24:53 -08:00
Ryan Barrett
dde86008e2
shared inbox bug fix
...
fixes https://console.cloud.google.com/errors/detail/CK7Cx8KS7qyNHQ;time=P30D?project=bridgy-federated
2022-11-17 14:55:54 -08:00
Ryan Barrett
023f2aa536
sharedInbox bug fix, needs to be inside endpoints mapping
...
for #285 , https://www.w3.org/TR/activitypub/#endpoints
2022-11-17 12:59:09 -08:00
Ryan Barrett
8fd49dc882
drop non-public Create activities
...
fixes #289
2022-11-16 16:37:50 -08:00