Ryan Barrett
ab4427c182
web.poll_feed_task: handle missing Content-Type header
...
fixes https://console.cloud.google.com/errors/detail/CKiskJSXi5z9gwE;time=P30D?project=bridgy-federated
2024-01-11 13:01:45 -08:00
Ryan Barrett
81e675f79b
web.poll_feed_task: default actor/author to user
2024-01-09 16:02:41 -08:00
Ryan Barrett
a2ed71b3ec
util.parse_mf2: use metaformats photo if h-card doesn't have one
2024-01-09 13:07:03 -08:00
Ryan Barrett
aac85cedca
web feed polling: if we get Content-Type application/xml, use the link's type
...
fixes eg https://simonwillison.net/atom/everything/
2024-01-09 12:00:44 -08:00
Ryan Barrett
e82555ad91
Web: add poll feed task for new users, drop task if they've sent a webmention
2024-01-06 13:57:11 -10:00
Ryan Barrett
1db5358688
Web: test a couple poll feed errors
2024-01-06 13:04:22 -10:00
Ryan Barrett
5f1c521500
Web: add last_polled_feed property
2024-01-06 12:56:37 -10:00
Ryan Barrett
26de4097ae
AP: switch default signing actor to real fed.brid.gy instance actor
...
https://seb.jambor.dev/posts/understanding-activitypub-part-4-threads/#the-instance-actor
2024-01-06 11:59:31 -10:00
Ryan Barrett
6025925c26
web: start removing superfeedr code
2024-01-04 16:32:39 -10:00
Ryan Barrett
72df4d7d42
web: enforce https (SSL) requirement
...
fixes https://console.cloud.google.com/errors/detail/CP2isf7noqyZjAE;time=P30D?project=bridgy-federated . thanks for finding @tantek!
2024-01-03 16:32:57 -10:00
Ryan Barrett
beb865bc07
web feed fetching: add next poll task
...
use average of time between posts in feed as ETA
for #550
2024-01-01 20:12:33 -10:00
Ryan Barrett
9347651349
web feed fetching: test RSS, store feed index in AS1
...
for #550
2024-01-01 20:12:33 -10:00
Ryan Barrett
7e702305bf
Web: add poll_feed_task for ingesting Atom/RSS feeds
...
also demotes Web.atom to informational only, we're switching to populate feed entries into our_as1 because we can't easily extract individual items from feedparser.
for #550
2024-01-01 20:12:33 -10:00
Ryan Barrett
58dcd72154
change Web icon from spider web to globe lat/lon lines
2023-12-29 21:00:08 -08:00
Ryan Barrett
cf17c5ce47
disable superfeedr subscribe/unsubscribe
...
for #550
2023-12-05 13:07:21 -08:00
Ryan Barrett
8f3b4c1c9b
Web: ignore superfeedr subscribe failures
...
it's pretty unreliable right now 😕
for #550
2023-12-05 13:07:17 -08:00
Ryan Barrett
b7129703cd
Web: don't subscribe to Superfeedr if user has webfinger redirects
...
for #550
2023-12-05 09:28:19 -08:00
Ryan Barrett
9a088f5b7f
Web: unsubscribe from superfeedr on first webmention
...
for #550
2023-12-05 08:59:29 -08:00
Ryan Barrett
d14b1bc04c
add Web.maybe_superfeedr_unsubscribe
...
for #550
2023-12-05 08:51:27 -08:00
Ryan Barrett
b0f278e033
Web: when subscribing to superfeedr, handle returned posts
...
for #550
2023-12-05 06:52:33 -08:00
Ryan Barrett
8650a90bf5
Web: integrate superfeedr subscribe into get_or_create
...
for #550
2023-12-04 11:34:19 -08:00
Ryan Barrett
ba010e74b0
Web.maybe_superfeedr_subscribe: add feed discovery
...
for #550
2023-12-04 11:18:00 -08:00
Ryan Barrett
eb4e11ae3d
Web: add superfeedr_subscribed prop, populate it in maybe_superfeedr_subscribe
...
for #550
2023-12-04 10:54:49 -08:00
Ryan Barrett
b113521f94
Web: start on Superfeedr subscribe
...
for #550
2023-12-04 10:35:05 -08:00
Ryan Barrett
637128a05c
add Web.last_webmention_in property
...
for #550
2023-12-03 21:46:31 -08:00
Ryan Barrett
c54df36164
start to add superfeedr notify handler
...
for #550
2023-12-02 21:18:22 -08:00
Ryan Barrett
2f4bae8dc9
change Web.ap_subdomain default to 'web'
2023-11-30 20:08:41 -08:00
Ryan Barrett
1b06b1a758
add to Web.NON_TLDS
2023-11-30 20:06:07 -08:00
Ryan Barrett
6e236e2d70
switch User.ap_actor to id_as, use Web.ap_subdomain property
2023-11-30 17:10:18 -08:00
Ryan Barrett
d33832be1c
add Web.ap_subdomain property, use it in webfinger
...
Originally, BF served Web users' AP actor ids on fed.brid.gy, eg
https://fed.brid.gy/snarfed.org . When we started adding new protocols, we
switched to per-protocol subdomains, eg https://web.brid.gy/snarfed.org .
However, we need to preserve the old users' actor ids as is. So, this property
tracks which subdomain a given Web user's AP actor uses.
2023-11-30 15:43:38 -08:00
Ryan Barrett
520b2fd3b0
User.ap_address() => handle_as(ActivityPub)
2023-11-29 21:06:55 -08:00
Ryan Barrett
a5f9daa46f
change Web.ap_address to use has_redirects instead of direct
...
for #551
2023-11-29 16:41:11 -08:00
Ryan Barrett
911814dba2
Web.fetch: use util.parse_mf2's new metaformats support
2023-11-29 13:21:13 -08:00
Ryan Barrett
18f79d2626
Web: start adding metaformats support
...
for #551
2023-11-29 12:00:48 -08:00
Ryan Barrett
b81fa2090b
Protocol.receive: handle opted out users
2023-11-27 06:53:22 -08:00
Ryan Barrett
dc3b23f80b
Web.fetch: ignore uid if set; we use URL as id
...
props and thanks to @fluffy-critter for being my unintentional edge case QA department 😆 🙏
fixes https://console.cloud.google.com/errors/detail/CKLuk-v4x8X0NQ;time=P30D?project=bridgy-federated
2023-11-26 16:31:29 -08:00
Ryan Barrett
fae7769d2b
Web.get_or_create bug fix: handle opted out users
...
fixes https://console.cloud.google.com/errors/detail/CJ2U0_Hq6cHnUA;time=P30D?project=bridgy-federated
2023-11-26 15:37:39 -08:00
Ryan Barrett
1591dfb641
pass user to Protocol.send/convert instead of using g.user
...
for #690
2023-11-25 20:07:14 -08:00
Ryan Barrett
3c9744fab0
pass authed_as to Web.receive
2023-11-25 16:01:07 -08:00
Ryan Barrett
990ec47c89
stop using g.user in web, part of redirect
...
for #690
2023-11-19 21:53:39 -08:00
Ryan Barrett
d2dee8752f
/convert/: if dest protocol is AP, don't assume source protocol is Web
2023-11-08 11:28:17 -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
acb1c703a3
rename Protocol.serve => .convert, move Content-Type to class constant
2023-10-25 12:31:52 -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
e66ca3fb7f
noop: expand a few log messages
2023-10-18 13:13:44 -07:00
Ryan Barrett
12375e0111
protect webmention and receive task handlers with @cloud_tasks_only
2023-10-18 11:03:21 -07:00
Ryan Barrett
787c64c674
remove a couple errant util.d's
2023-10-14 14:14:05 -07:00
Ryan Barrett
441c5aa29f
log_data bug fixes
2023-10-14 14:13:13 -07:00
Ryan Barrett
1b78e86e6c
add Protocol.LOGO_HTML constant, change user page to link to external user
...
for #442
2023-10-11 12:25:38 -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
7e7962fe45
add orig_obj kwarg to Protocol.send
2023-10-07 12:49:39 -07:00
Ryan Barrett
62302b9105
more docstring formatting tweaks
2023-10-06 08:22:50 -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
1a003c8c5b
refactor User.ap_address implementations to highlight similarities
2023-09-25 14:16:14 -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
e9e8827ef9
standardize more on 'handle' and 'id' terms
...
* User.readable_id => handle
* User.readable_or_key_id => handle_or_id
2023-09-25 12:33:24 -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
e257d43f21
webfinger: if user part isn't an id, try resolving it as a handle
2023-09-22 15:14:15 -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
55f96c428e
common.create_task: run task inline if we're in a local server
2023-09-18 19:02:15 -07:00
Ryan Barrett
0723eca115
migrate webmention task to common.create_task
...
also bring back lexrpc logging, other minor docstring/comment updates
2023-09-11 16:21:03 -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
0e5d980111
incoming webmentions: skip backlink check when running locally
2023-09-09 15:47:38 -07:00
Ryan Barrett
0d2e4fb66a
noop: protocol: label classmethod cls identifiers with from/to
2023-09-09 14:19:27 -07:00
Ryan Barrett
f116dbfa26
implement atproto_handle() in Web, ActivityPub, ATProto
2023-09-06 19:52:09 -07:00
Ryan Barrett
8b242e65ba
move common.is_blacklisted to Protocol so that subclasses can override it
2023-09-06 17:35:15 -07:00
Ryan Barrett
de5191a10e
bug fix for web user updat profile button
...
for synthesized update/create/delete activities, switch actor id from protocol-specific AP to protocol-agnostic web URL.
thanks @capjamesg for reporting!
2023-08-02 19:12:09 -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
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
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
9a7597b365
don't allow blocklisted domains in Web, ActivityPub ids
...
for #597
2023-07-22 20:09:16 -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
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
15557dc78f
merging receive: Web: handle ValueError raised by protocol.receive
...
for #529
2023-07-11 13:25:31 -07:00
Ryan Barrett
cfa43135a5
Web.fetch default author bug fix, only add if URL is not homepage
2023-07-11 13:25:31 -07:00
Ryan Barrett
a2ed0afda8
merging receive: Web.fetch: default actor/author to home page URL
...
for #529
2023-07-11 13:25:31 -07:00
Ryan Barrett
ceb72e516c
Web.send: ignore accept activities
...
webmention/mf2 have no corrolary yet
2023-07-11 13:25:31 -07:00
Ryan Barrett
56ebdba049
merging receive: propagate new/changed from receive into new Object
...
for #529
2023-07-11 13:25:30 -07:00
Ryan Barrett
9c62786f06
merging receive: delivery bug fix, stop suppressing webmention send errors
...
for #529
2023-07-11 13:25:30 -07:00
Ryan Barrett
ee3a596dbb
Summary merging Protocol/Web receive: change receive to take Object
...
for #529
2023-07-11 13:25:29 -07:00
Ryan Barrett
4f8bcf9606
merging Protocol/Web receive: move _deliver, _targets from Web to Protocol
...
for #529
2023-07-11 13:25:29 -07:00
Ryan Barrett
ee4da3561c
merging Protocol/Web receive: tweak error handling, de-dupe target URLs
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
d0d6a13044
merging Protocol/Web receive: tweaks to Object.users, Object.labels
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
ecbc76dd94
minor, use common.add a few more places
2023-07-11 13:25:28 -07:00
Ryan Barrett
aeeea5590d
merging Protocol/Web receive: handle bare reply objects
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
54881ea707
lots more on merging Protocol/Web receive and deliver
...
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett
f254dea004
merge Protocol.receive: follow tweaks, like test
...
for #529
2023-07-11 13:25:28 -07:00