Ryan Barrett
be56539eb2
ATProto.send: explicitly ignore accepts, undos
2024-03-12 20:48:23 -07:00
Ryan Barrett
aea4880e6f
ATProto.convert: fill in strongRef URIs with DIDs as well as CID
...
also error handling in ATProto.fetch for failed getRecord requests
2024-03-12 14:45:48 -07:00
Ryan Barrett
cf4d105c3e
atproto: when creating new commits, fetch remote objects' CIDs if necessary
...
fixes sending likes, reposts, etc to ATProto
2024-03-12 11:12:34 -07:00
Ryan Barrett
c0b75e4fbd
Protocol.load: return None if the entity is too big
...
fixes https://console.cloud.google.com/errors/detail/CO-fpZfMq_6ktgE;time=P30D?project=bridgy-federated
2024-03-11 15:31:31 -07:00
Ryan Barrett
51254f67de
atproto: tweak profile label, add bridgy-fed-
2024-03-11 15:31:31 -07:00
Ryan Barrett
95e46c5ebb
Revert "cache outbound HTTP request responses, locally to each inbound request"
...
This reverts commit 30debfc8fa
.
seemed promising, but broke in production. Saw a lot of `IncompleteRead`s on both GETs and POSTs. Rolled back for now.
```
('Connection broken: IncompleteRead(9172 bytes read, -4586 more expected)', IncompleteRead(9172 bytes read, -4586 more expected))
...
File "oauth_dropins/webutil/util.py", line 1673, in call
resp = getattr((session or requests), fn)(url, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/session.py", line 102, in get
return self.request('GET', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/session.py", line 158, in request
return super().request(method, url, *args, headers=headers, **kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/session.py", line 205, in send
response = self._send_and_cache(request, actions, cached_response, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/session.py", line 233, in _send_and_cache
self.cache.save_response(response, actions.cache_key, actions.expires)
File "requests_cache/backends/base.py", line 89, in save_response
cached_response = CachedResponse.from_response(response, expires=expires)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/models/response.py", line 102, in from_response
obj.raw = CachedHTTPResponse.from_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests_cache/models/raw_response.py", line 69, in from_response
_ = response.content # This property reads, decodes, and stores response content
^^^^^^^^^^^^^^^^
File "requests/models.py", line 899, in content
self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "requests/models.py", line 818, in generate
raise ChunkedEncodingError(e)
```
2024-03-11 15:31:30 -07:00
Ryan Barrett
30debfc8fa
cache outbound HTTP request responses, locally to each inbound request
...
using requests-cache. pretty straightforward! for #588
2024-03-08 12:34:49 -08:00
Ryan Barrett
01e5ac51ab
fix crash in Web.owns_id
...
fixes https://console.cloud.google.com/errors/detail/CPOsl7usgr3VUQ;time=P30D?project=bridgy-federated
2024-03-06 14:04:44 -08:00
Ryan Barrett
7c5496113f
fix a few tests that were using the network
2024-03-04 16:35:38 -08:00
Ryan Barrett
0101cf04ea
atproto: fetch records from AppView (api.bsky.app) instead of PDSes
...
fixes #688
2024-03-04 16:35:31 -08:00
Ryan Barrett
396c3a64f3
ATProto.fetch: support bsky.app URLs
2024-03-02 16:50:01 -08:00
Ryan Barrett
c2b8db8687
atproto: self label profiles with 'bridged-from-[protocol]'
...
fixes #827
2024-03-01 13:31:59 -08:00
Ryan Barrett
e765eaa710
update tests for snarfed/arroba@375bf19
2024-02-29 15:30:04 -08:00
Ryan Barrett
f647afe70f
atproto: update labels test for snarfed/granary@3057631
2024-02-29 12:52:49 -08:00
Ryan Barrett
0610c3c175
activitypub.actor: check enabled protocols
2024-02-29 12:52:49 -08:00
Ryan Barrett
d2865fdb86
add common.ENABLED_BRIDGES, check before conversion and /bridge-user
2024-02-28 12:07:06 -08:00
Ryan Barrett
942452f176
AP: ignore unlisted posts
...
for #832
2024-02-27 12:05:18 -08:00
Ryan Barrett
9489204d64
AP: add profile to Content-Type: application/ld+json
...
for #895
2024-02-27 11:38:00 -08:00
Ryan Barrett
fce24c0645
/web-site: don't allow URLs with paths
...
for #882
2024-02-27 11:19:14 -08:00
Ryan Barrett
8288390cfd
AP inbox delivery, Protocol.receive: error on blocklisted ids
...
fixes https://console.cloud.google.com/errors/detail/CN278MyjhZbtOQ;time=P30D?project=bridgy-federated , https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-02-27 06:42:19 -08:00
Ryan Barrett
42b4541c8d
Web.get_or_create: bug fix for normalizing domain case
...
fixes https://console.cloud.google.com/errors/detail/CKOs59zx0rSXQg;time=P30D?project=bridgy-federated
2024-02-26 19:26:47 -08:00
Ryan Barrett
56a3c0e34b
bluesky: opt out users who have disabled logged out view on bsky.app
...
ie "Discourage apps from showing my account to logged-out users" on https://bsky.app/moderation
fixes #828
https://docs.bsky.app/docs/advanced-guides/resolving-identities#for-backend-services
https://github.com/bluesky-social/atproto/blob/main/packages/api/docs/labels.md#label-behaviors
2024-02-23 10:33:34 -08:00
Ryan Barrett
ac4b7fb4e5
web.poll_feed_task: handle more HTTP and parse errors
...
fixes https://console.cloud.google.com/errors/detail/CNj81tKbzNSzwAE;time=P30D?project=bridgy-federated
2024-02-20 12:23:20 -08:00
Ryan Barrett
675e39809e
web UI: tweak user links in user page header
2024-02-11 14:39:09 -08:00
Ryan Barrett
855efa04f3
test_atproto: update tests for snarfed/granary@ac0bc429e5
2024-02-10 22:13:40 -08:00
Ryan Barrett
484c637219
authorization check: handle domain vs homepage for web users
...
for #566
2024-02-10 10:30:25 -08:00
Ryan Barrett
95e5f6d596
test_activitypub noop, prune mock responses
2024-02-10 10:30:24 -08:00
Ryan Barrett
6a63820cd8
tighten Object.owns_id to reject blocklisted domains
...
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-02-08 14:41:15 -08:00
Ryan Barrett
c966090912
Protocol.load: reload objects if our copy is over 30d old
...
fixes #628
no clue how much this will impact our outbound request load. we'll see!
2024-02-08 11:23:09 -08:00
Ryan Barrett
0cfa9a4ef8
update tests for snarfed/granary@e7778f3
2024-02-02 07:38:07 -08:00
Ryan Barrett
21ba279b31
ActivityPub.convert: fill in context in obj.as2
2024-01-28 18:15:37 -08:00
Ryan Barrett
f9d94522d0
/r/: return 404 for opted out users' URLs
2024-01-28 08:54:35 -08:00
Ryan Barrett
9818b39b16
Web.owns_id bug fix: return None for opted out domain, not False
2024-01-27 13:45:02 -08:00
Ryan Barrett
fcef6c21ab
Revert "heuristic: assume no AP actor id is the root path on its host"
...
This reverts commit b7e890b4bb
.
it was a nice idea, but we're now hitting AP actor ids that are the root path on their host. this is evidently how microblog.pub does AP; 0x3b0b's site https://bw3.dev/ is an example. general info on https://docs.microblog.pub/user_guide.html#activitypub but not this specifically.
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-01-26 12:59:54 -08:00
Ryan Barrett
8ab09511bd
bug fix for following from web UI with custom username
...
thanks again for reporting @campegg!
2024-01-26 06:52:03 -08:00
Ryan Barrett
3bcef0d37d
follow UI: specific error message for trying to follow bridged accounts
...
thanks for the nudge @campegg!
2024-01-25 17:05:26 -08:00
Ryan Barrett
114ba69d3b
test fix for 86079c3684
2024-01-22 13:20:03 -08:00
Ryan Barrett
907e6e7aeb
show Web user page even when direct is False
...
not other protocols though
2024-01-22 13:12:20 -08:00
Ryan Barrett
4bcf6b463f
web follow bug fix: error gracefully on BF user addresses
...
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-01-22 08:43:33 -08:00
Ryan Barrett
4e5021e2b0
/web-site bug fix, handle opted out users
...
fixes https://console.cloud.google.com/errors/detail/CN7a9KGAicelyAE;time=P30D?project=bridgy-federated
2024-01-22 08:43:33 -08:00
Ryan Barrett
3a8d33ee52
web feed polling: start using ETag/If-None-Match and Last-Modified/If-Modified-Since
...
for #791
2024-01-19 21:07:48 -08:00
Ryan Barrett
3e49fafd0a
unfollow UI: bug fix for when indieauth home page fetch fails
...
fixes https://console.cloud.google.com/errors/detail/CIb-6vLIioHJaw;time=P30D?project=bridgy-federated
2024-01-19 11:33:58 -08:00
Ryan Barrett
09dcabc708
feed polling: bug fix, calculate posting frequency independent of order
2024-01-19 11:33:58 -08:00
Ryan Barrett
7fcbf89d97
feed polling: add Web.feed_last_item, skip parts of feeds we've already seen
...
for #791
2024-01-19 11:33:58 -08:00
Ryan Barrett
a832a4edf6
follow UI: error on bridged accounts
...
also make ActivityPub.owns_handle return False for bridged accounts
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P30D?project=bridgy-federated
2024-01-15 07:57:03 -08:00
Ryan Barrett
4529f30dce
switch from opt_outs.txt to new User.manual_opt_out property
...
opt_outs.txt wasn't included in continuous deploy from Circle, so those deploys were ignoring ids in that file :/
2024-01-14 21:02:39 -08:00
Ryan Barrett
b6989a4f2e
if a web user has the webfinger redirects, use AS2 type Person, not Application
2024-01-14 13:53:28 -08:00
Ryan Barrett
7941b632ca
Object._pre_put_hook: require that protocol owns id
2024-01-12 19:53:01 -08:00
Ryan Barrett
e9194b0a66
AP: default actors to type Application, add disclaimer with links to profile bio
...
thanks for the nudge @fromjasonstuff!
2024-01-11 16:37:10 -08:00
Ryan Barrett
c8e2fafba4
web.poll_feed_task: use URL as id since some feeds use non-URL (eg tag URI) ids
...
example: https://www.producthunt.com/feed , Atom. excerpt:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom ">
<id>tag:www.producthunt.com,2005:/feed</id>
<link rel="alternate" type="text/html" href="https://www.producthunt.com "/>
<link rel="self" type="application/atom+xml" href="https://www.producthunt.com/feed "/>
<title>Product Hunt — The best new products, every day</title>
<updated>2024-01-10T02:57:06-08:00</updated>
<entry>
<id>tag:www.producthunt.com,2005:Post/432225</id>
<published>2023-12-31T18:15:55-08:00</published>
<updated>2024-01-10T12:54:42-08:00</updated>
<link rel="alternate" type="text/html" href="https://www.producthunt.com/posts/seemless "/>
<title>Seemless</title>
...
```
fixes https://console.cloud.google.com/errors/detail/CKLuk-v4x8X0NQ;time=P30D?project=bridgy-federated
2024-01-11 13:01:45 -08:00
Ryan Barrett
91876a7d22
web.poll_feed_task: handle when feed content and Content-Type don't match
...
fixes https://console.cloud.google.com/errors/detail/CIX--Oz-w4D_Xg;time=P30D?project=bridgy-federated
2024-01-11 13:01:45 -08:00
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
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
bab5270c3b
start clearing Object.our_as1 again on updates
...
fixes #778 . bug was that when we fetched a web object, we'd populate the new `mf2` value, but still keep the old `our_as1`, which then overrode it in `as1`. ugh.
partially reverts commit 62ca4022fb
for #721 .
2024-01-08 13:03:44 -08:00
Ryan Barrett
178b5ccde3
/convert: handle missing protocols
...
fixes https://console.cloud.google.com/errors/detail/CLHg5u_DuYGWaw;time=P30D?project=bridgy-federated
2024-01-08 07:53:18 -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
28fa7eba8c
User.get_or_create: set transient User.existing attribute
...
would have used new, but it's already a method
2024-01-06 13:19:43 -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
95e699f5b5
/r/: serve Vary: Accept header
2023-12-31 09:21:04 -08:00
Ryan Barrett
49eb9b8541
add Mastodon instance info at /api/v1/instance
...
https://docs.joinmastodon.org/methods/instance/#v1
right now just for FediSeer: https://fediseer.com/faq/eng#how-can-i-claim-my-instance
2023-12-31 08:42:26 -08:00
Ryan Barrett
e9a8d81d43
testutil noop: remove unused import
2023-12-29 21:00:08 -08:00
Ryan Barrett
94b821bef5
test_ids: fix shadowed test method
...
woo, thanks for the catch flake8!
2023-12-24 10:26:12 -08:00
Ryan Barrett
199fb65dd6
ids.translate_object_id: handle Web.ap_subdomain
...
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:20:04 -08:00
Ryan Barrett
2fafd83344
ids.translate_user_id: handle Web.ap_subdomain
...
for https://github.com/snarfed/bridgy-fed/discussions/768
2023-12-24 10:04:01 -08:00
Ryan Barrett
b999cfe59a
ActivityPub.convert bug fix: don't call postprocess_as2_actor without user
...
fixes https://console.cloud.google.com/errors/detail/CKmOubHj-8H84AE;time=P30D?project=bridgy-federated
2023-12-14 15:48:02 -08:00
Ryan Barrett
07177e7d93
fix tests for lexrpc v0.5
2023-12-14 15:46:54 -08:00
Ryan Barrett
79af59b951
upgrade mf2py to 2.0.1, add test for resolving relative URLs in content
...
fixes #390 , re https://github.com/microformats/mf2py/issues/181 . thank you again @angelogladding!
2023-12-08 10:02:07 -08:00
Ryan Barrett
afc2511e62
refactor follow/unfollow web UI to use Protocol.receive
2023-12-06 10:11:36 -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
0e5866dbd9
Object.as1 from atom: override more ids with urls when necessary
2023-12-05 12:39:40 -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
5485cbeece
Object.as1 from atom: extract object, override id with url
2023-12-02 20:56:07 -08:00
Ryan Barrett
e217419747
add Object.atom property
...
for #550
2023-12-02 14:30:14 -08:00
Ryan Barrett
2c19a5a3af
drop obsolete unwrap in Object.as1 when converting from as2
2023-12-02 14:25:38 -08:00
Ryan Barrett
d0f7264db7
webfinger: handle users without handles
...
fixes https://console.cloud.google.com/errors/detail/CJ7P7OGD5oz_Dw;time=P30D?project=bridgy-federated
2023-12-01 15:46:37 -08:00
Ryan Barrett
d538928fe6
activitypub.postprocess_as2_actor: bug fix for publicKey w/Web.ap_subdomain
2023-12-01 13:06:59 -08:00
Ryan Barrett
2f4bae8dc9
change Web.ap_subdomain default to 'web'
2023-11-30 20:08:41 -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
e03a2b6517
update tests for moving metaformats h-card code to webutil
...
for snarfed/webutil@f4d35301f6
2023-11-30 14:43:06 -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
c816be48ba
ids.translate_handle: add enhanced kwarg
...
for #551
2023-11-29 16:41:09 -08:00
Ryan Barrett
e079cec77c
ActivityPub.convert: omit acct: URIs
...
for #738 , https://github.com/Automattic/wordpress-activitypub/issues/571
2023-11-29 14:51:56 -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
aaf115347e
add manual opt-out list
2023-11-29 10:25:45 -08:00
Ryan Barrett
62ca4022fb
stop clearing Object data properties
...
...so that we have original data preserved when we override it in our_as1. fixes #721
2023-11-28 06:39:34 -08:00
Ryan Barrett
1ec1fc2482
genericize user handles on UI follower/following pages
2023-11-27 21:40:01 -08:00
Ryan Barrett
004726d397
fix followers/ing UI page for AP users
...
fixes #718
2023-11-27 21:01:02 -08:00
Ryan Barrett
ee373095e2
send follow accepts to protocols that support them
...
for #710
2023-11-27 16:32:22 -08:00
Ryan Barrett
8f7facda97
don't automatically accept follows from protocols that support them natively
...
for #710 . adds per-protocol `HAS_FOLLOW_ACCEPTS` constant
2023-11-27 14:44:05 -08:00
Ryan Barrett
443506c425
activitypub.postprocess_as2_actor: remove obsolete wrap kwarg
2023-11-27 11:51:52 -08:00
Ryan Barrett
8f0d2d8650
AP: handle opted out users in following/ers, outbox collections
2023-11-27 11:32:30 -08:00
Ryan Barrett
fe8b710cce
User.get_by_id: handle opt-out
2023-11-27 11:28:05 -08:00
Ryan Barrett
b81fa2090b
Protocol.receive: handle opted out users
2023-11-27 06:53:22 -08:00
Ryan Barrett
dd62f472da
User.get_or_create: return None if opted out
2023-11-27 06:53:22 -08:00
Ryan Barrett
d79e2badf4
fix tests for dc3b23f80b
2023-11-26 21:39:31 -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
d7d55864ad
activitypub.actor bug fix: handle opted out users
...
fixes https://console.cloud.google.com/errors/detail/CKOs59zx0rSXQg;time=P30D?project=bridgy-federated
2023-11-26 15:44:43 -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
6091cd4063
drop the rest of g.user!
...
for #690
2023-11-25 20:38:28 -08:00
Ryan Barrett
03315891aa
drop a lot of g.user
...
for #690
2023-11-25 20:23:19 -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
e947891d75
Protocol.receive: fail if incoming activity doesn't have actor or author
...
for #690
2023-11-25 14:50:08 -08:00
Ryan Barrett
69ac7eabca
activitypub: move postprocess_as2_actor out of postprocess_as2
...
...and into ActivityPub.convert and actor handler directly. for #690
2023-11-24 09:20:52 -08:00
Ryan Barrett
ee571e5b25
activitypub: move compacting actors from postprocess_as2 to convert
...
for #690
2023-11-24 08:34:39 -08:00
Ryan Barrett
33c5c3a4d2
AP: add HEAD support to followers/ing, outbox collections
...
for #383
2023-11-23 22:41:52 -08:00
Ryan Barrett
579f55d965
AP: add paging to outbox
...
finishes / fixes #383
2023-11-23 22:35:38 -08:00
Ryan Barrett
db2668ffab
activitypub.postprocess_as2_actor: handle user without handle
...
fixes https://console.cloud.google.com/errors/detail/CIT9-r3d-MKW5AE;time=P30D?project=bridgy-federated
2023-11-23 22:09:11 -08:00
Ryan Barrett
dcd7081d48
activitypub.actor: remove redundant preferredUsername
...
no clue why this triggered these flaky test failures, they happened when I ran all tests, but not test_pages on its own. grr.
2023-11-23 22:09:11 -08:00
Ryan Barrett
f27e914a89
User.handle_as: handle when handle isn't set
...
for https://console.cloud.google.com/errors/detail/CIT9-r3d-MKW5AE;time=P30D?project=bridgy-federated
2023-11-23 22:09:05 -08:00
Ryan Barrett
e5abdc097f
implement outbox
...
only first page. for #383
2023-11-22 21:40:36 -08:00
Ryan Barrett
48f89cebc0
User.handle_as: handle web users with custom usernames
...
bug fix for b255962
, fixes https://console.cloud.google.com/errors/detail/CPiAj72alvDYNQ;time=P30D?project=bridgy-federated
2023-11-22 19:00:02 -08:00
Ryan Barrett
f6af56f1c4
test_activitypub: use our_as1 for test web user, not as2
2023-11-22 17:59:18 -08:00
Ryan Barrett
b255962fde
activitypub: genericize preferredUsername across protocols
2023-11-22 17:24:08 -08:00
Ryan Barrett
9b67d5273f
remove g.user in a few more places in activitypub
...
for #690
2023-11-20 16:21:20 -08:00
Ryan Barrett
c593a80ee9
fix test_integrations for g.user minimizing in #690
2023-11-19 21:53:39 -08:00
Ryan Barrett
2c6a470058
drop g.user in lots of tests
...
for #690
2023-11-19 21:53:39 -08:00
Ryan Barrett
fefcbbb77e
drop Protocol.actor_key's default_g_user kwarg
...
for #690
2023-11-19 21:53:38 -08:00
Ryan Barrett
bee313fb67
drop User.atproto_did, switch to using copies
2023-11-15 19:08:06 -08:00
Ryan Barrett
4d095fa3d9
misc cleanup
...
* remove obsolete TODOs, commented out code
* remove obsolete circular imports of per-protocol modules
* minimize Object put in Protocol.load
* remove duplicated Protocol.load tests in test_activitypub
* re-enable rest of ActivityPubUtilsTest.test_postprocess_as2_idempotent
* drop default cls=Web in TestCase.make_user
2023-11-15 14:23:08 -08:00
Ryan Barrett
507cb19c32
test_integrations: import test_web instead of WebTest to avoid duplicating
...
before this, unittest thought the imported WebTest was a new test class and ran it again.
2023-11-15 12:40:59 -08:00
Ryan Barrett
d237d9611c
atproto: store extra `cid` field in Object.bsky, populate in record strongRefs
2023-11-14 19:24:37 -08:00
Ryan Barrett
95631396b7
atproto: fill in createdAt
...
for snarfed/granary@a0795b8c34
2023-11-14 15:24:51 -08:00
Ryan Barrett
81838df113
atproto.poll_posts: store record, not #postView
2023-11-14 14:21:22 -08:00
Ryan Barrett
a5b5078729
ATProto: first pass at polling posts (timelines)
...
for #694
2023-11-14 12:30:14 -08:00
Ryan Barrett
9c5adab4f4
ATProto.send: support likes, reposts, follows
...
snarfed/bridgy-fed#717
2023-11-14 10:56:52 -08:00
Ryan Barrett
ac6f98f54c
integration test for #720
...
BF's first integration test! hopefully more to come, eg snarfed/bridgy-fed#689
actual fix is in snarfed/granary@3c782f9
2023-11-13 14:37:16 -08:00
Ryan Barrett
cbbea104fc
cache Protocol.for_id
...
fixes #727
2023-11-13 14:18:32 -08:00
Ryan Barrett
91c25f6955
testutil noop, TestCase.make_user: include source_protocol in profile Object
2023-11-13 14:08:21 -08:00
Ryan Barrett
00fb4dd14d
move test_atproto.KEY to testutil.ATPROTO_KEY
2023-11-13 14:08:21 -08:00