Ryan Barrett
91c25f6955
testutil noop, TestCase.make_user: include source_protocol in profile Object
2023-11-13 14:08:21 -08:00
Ryan Barrett
2a7c0adf0f
bug fixes for suppressing mentions of in-reply-to-authors
...
for 84324c0c0b
, #686
2023-11-11 14:52:21 -08:00
Ryan Barrett
bca034c4f8
ids: use subdomain-wrapped URLs to convert ATProto to Web/AP
2023-11-06 20:17:23 -08:00
Ryan Barrett
98bb29b333
drop Object.proxy_url, switch callers to ids.translate_object_id
2023-11-06 12:18:11 -08:00
Ryan Barrett
06275324fd
Web.convert: call translate_ids
2023-11-03 15:52:37 -07:00
Ryan Barrett
aa5c6a396e
ActivityPub: translate ids in convert
2023-11-03 15:11:21 -07:00
Ryan Barrett
db646909e2
delivery: switch from threads to tasks, one per send
...
for #652
2023-10-31 12:49:27 -07:00
Ryan Barrett
ca8b7484c0
drop User.as2, Object.as_as2, switch callers to Protocol.convert
2023-10-25 13:28:01 -07:00
Ryan Barrett
acb1c703a3
rename Protocol.serve => .convert, move Content-Type to class constant
2023-10-25 12:31:52 -07:00
Ryan Barrett
6a867ca2c4
update for granary.as2's new PropertyValue attachment handling
...
snarfed/granary@20d6c3f065
2023-10-24 16:02:16 -07:00
Ryan Barrett
b32045d494
postprocess_as2: duplicate content into contentMap.en
...
for #681 . this suppresses Mastodon's Translate link. longer term "right" fix is to actually detect the source's language, if available, and use it instead.
2023-10-20 13:37:54 -07:00
Ryan Barrett
d31f470178
Web.is_web_url: ignore www subdomain
...
for 3b88b0f
2023-10-19 16:25:04 -07:00
Ryan Barrett
fe3a9b693c
User.get_or_create: load user profile object, fetch if it doesn't exist
2023-10-19 15:01:19 -07:00
Ryan Barrett
c1b07acfa5
cloud tasks only
2023-10-18 11:03:22 -07:00
Ryan Barrett
c83c77a73e
authorization: log when authed user doesn't match activity's author/actor
...
for #566 . just logging for now, want to see if we're already hitting this at all.
2023-10-16 11:13:38 -07:00
Ryan Barrett
15a325c928
AP: compact outgoing actor, author, and attributedTo fields to string ids
...
hope this improves compatibility with many other AP implementations that choke on objects instead of ids. fixes #658
2023-10-11 16:17:43 -07:00
Ryan Barrett
5bf081afdb
make Protocol/Web.key_for() follow use_instead
...
fixes #662 . probably more to do here eventually though, eg #665 .
2023-10-10 09:58:07 -07:00
Ryan Barrett
d5499acaf3
AP: parallelize inbox delivery with a thread pool
...
fixes #652 . this should make inbox deliveries roughly 10x faster.
2023-10-07 15:08:02 -07:00
Ryan Barrett
db29ad7757
docs: fix docstring formatting, other tweaks
2023-10-05 23:32:31 -07:00
Ryan Barrett
e89730e68f
drop /_ah/ path prefix on task handlers
...
...since it's not supported in dispatch.yaml: https://cloud.google.com/appengine/docs/flexible/reference/dispatch-yaml?tab=python#url
2023-09-29 13:49:17 -07:00
Ryan Barrett
771de9770e
AP inbox bug fix: handle Like with null object
...
fixes https://console.cloud.google.com/errors/detail/CIiI9b-nz7-bIA;time=P30D?project=bridgy-federated
2023-09-27 09:43:16 -07:00
Ryan Barrett
a9fcc167f6
replace User.readable_id computed property with handle
2023-09-25 15:08:14 -07:00
Ryan Barrett
c27404d681
/web-site: gracefully handle blocklisted domains
...
fixes https://console.cloud.google.com/errors/detail/CJbG4sGlnK7Jdw;time=P30D;refresh=true?project=bridgy-federated
2023-09-25 14:45:04 -07:00
Ryan Barrett
9b8b02e99f
consolidate ap_address in ATProto, Fake, Web (partially) into User
2023-09-25 12:45:47 -07:00
Ryan Barrett
6cdb04b53f
replace User.atproto_handle with handle_as('atproto')
2023-09-25 10:58:05 -07:00
Ryan Barrett
40ba007e9e
add User.handle()
2023-09-25 10:58:05 -07:00
Ryan Barrett
6a951138dc
oops, need to implement Web.profile_id after all
...
Web user ids are domains, eg user.com, but "web id" of a user profile is a full homepage url, eg https://user.com/
2023-09-23 14:57:26 -07:00
Ryan Barrett
169f8d7a2c
add Protocol.handle_to_id, implement in all protocols
2023-09-22 13:11:15 -07:00
Ryan Barrett
0d33b6422d
add Protocol.owns_handle (and in subclasses)
2023-09-22 12:17:42 -07:00
Ryan Barrett
f7792f81c8
tasks: add user param to receive, make create_task run inline in local server
2023-09-19 11:15:49 -07:00
Ryan Barrett
afda648a4a
tests: extract out assert_task() method
2023-09-13 14:36:24 -07:00
Ryan Barrett
a57edf8038
Web user signup: remove leading and trailing dots from domains
2023-09-10 22:04:00 -07:00
Ryan Barrett
f116dbfa26
implement atproto_handle() in Web, ActivityPub, ATProto
2023-09-06 19:52:09 -07:00
Ryan Barrett
6cddd95686
AP: always populate inbox and outbox in actors
...
required by AP! https://www.w3.org/TR/activitypub/#actor-objects
for #614
2023-08-19 15:12:46 -07:00
Ryan Barrett
e389690276
Web.fetch: handle author missing u-url
...
originally from https://r0ss.me/notes/20230727-starfield-animated-videos.html
2023-07-28 19:13:59 -07:00
Ryan Barrett
2f308b43e2
/convert: use generic Protocol for fed subdomain
...
not entirely sure about this one, will see
for #600
2023-07-26 09:02:23 -07:00
Ryan Barrett
96e523d887
fix Object.proxy_url to use per-protocol subdomains
...
it should have already been using them!
for #600
2023-07-26 09:02:23 -07:00
Ryan Barrett
aa124413f6
Web: set author to user homepage more carefully
...
for when h-entry author points to non-homepage, eg @techlifeweb's https://techlifeweb.com/blog/2023/07/2023-07-25-post-025/ 's author url is https://techlifeweb.com/hcard
2023-07-24 21:28:37 -07:00
Ryan Barrett
850e8a1dc8
switch convert URLs from ^^ back to #
...
for #581 . the ^^s didn't help with WordPress, which was the original motivation, and they're confusing everyone else.
2023-07-24 14:31:07 -07:00
Ryan Barrett
414fa5f197
Protocol.receive: resume existing create if it's not complete
2023-07-24 14:07:44 -07:00
Ryan Barrett
95cbfba31c
Web: default missing author to homepage, not fed.brid.gy AP actor URL
...
for #599
2023-07-24 12:17:03 -07:00
Ryan Barrett
17fe6db6eb
change Protocol.key_for to return None instead of raise on invalid user ids
...
hopefully fixes https://console.cloud.google.com/errors/detail/CKWmwa7SybLcQw;time=P30D?project=bridgy-federated
2023-07-22 20:32:55 -10:00
Ryan Barrett
405ca4145f
Web.send, ActivityPub.send: skip sending to blocklisted URLs
...
for #597
2023-07-22 20:02:12 -10:00
Ryan Barrett
ad893b1a97
update test_activitypub, test_web for new Object.notify/feed props
...
added in 95d0a695aa30c06880c218a96a98f591850a0a3c
2023-07-17 05:34:56 -10:00
Ryan Barrett
4b66e68232
Web.send: improve logic for skipping sends to followers
...
should stop the unrelated webmentions going to @gRegorLove et al
2023-07-15 14:33:54 -07:00
Ryan Barrett
8903273c2a
merging receive: Web: skip sending wms for normal posts (ie not replies etc)
...
for #529
2023-07-14 17:22:59 -07:00
Ryan Barrett
e194ccb3ad
Protocol.load/fetch returns True/False (or None) to mean "not this protocol"
...
ie, nothing failed, but the given id eitehr doesn't below to the given protocol, or fetched successfully but its data belongs to a different protocol.
vs raising exceptions for fetches that fail or error, eg network connection problems, Web got HTML with microformats2 but no h-entry, ActivityPub got non-AS2, etc.
used in Protocol.for_id: when a given Protocol's fetch doesn't work, we move on and try the next protocol _if_ it returned False (ie wasn't fetchable with that protocol, but we fail fast if it raises an exception (ie fetch failed).
2023-07-14 12:58:47 -07:00
Ryan Barrett
0e47918a38
merging receive: skip same-protocol deliveries and Followers
...
for #529
2023-07-13 14:21:13 -07:00
Ryan Barrett
815ae95560
merging receive: bug fix for same domain check: normalize target URLs earlier
...
for #529 , a3f99a81ce
2023-07-11 13:25:32 -07:00
Ryan Barrett
15557dc78f
merging receive: Web: handle ValueError raised by protocol.receive
...
for #529
2023-07-11 13:25:31 -07:00