Wykres commitów

350 Commity (main)

Autor SHA1 Wiadomość Data
Ryan Barrett ca8b7484c0
drop User.as2, Object.as_as2, switch callers to Protocol.convert 2023-10-25 13:28:01 -07:00
Ryan Barrett e833eb04dc
Object.resolve_ids: compact output objects with just id to bare string ids 2023-10-25 12:31:52 -07:00
Ryan Barrett 611bc94fc2
Object.as1 from bluesky: granary now sets actor/author
in snarfed/granary@eceb700c6c
2023-10-24 12:36:13 -07:00
Ryan Barrett 422a240183
Resolve protocol-subdomain-wrapped ids/URLs by stripping the subdomain wrapping
Renames Object.replace_copies_with_originals => resolve_ids. As a side effect, also fixes https://console.cloud.google.com/errors/detail/CK3U3PONxv5Q;time=P30D?project=bridgy-federated
2023-10-24 10:47:44 -07:00
Ryan Barrett d12fd99b03
noop: move Protocol.subdomain_url to common.subdomain_wrap 2023-10-23 15:44:32 -07:00
Ryan Barrett 158200d9fd
bug fix for opt out, handle HTML 2023-10-21 20:51:54 -07:00
Ryan Barrett 1fa205af30
User.get_or_create: only fetch user profile if we don't already have it 2023-10-20 11:23:43 -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 9e1acf1cf7
replace copy ids with originals in Protocol.load
honestly not sure if this is necessary yet, and it's moderately expensive, two serial datastore queries with an IN filter. we'll see.
2023-10-18 11:18:20 -07:00
Ryan Barrett efdf84a023
Protocol.receive: replace copy ids with originals, related bug fixes 2023-10-18 11:03:22 -07:00
Ryan Barrett ff88c082ef
try not clearing Object.bsky
now that we're starting to replace copies with originals in ids, actors, etc, it'd be nice to preserve the original source object data.
2023-10-18 11:03:22 -07:00
Ryan Barrett 96b84511eb
add Object.replace_copies_with_originals 2023-10-18 11:03:22 -07:00
Ryan Barrett fc96959383
tone down logging, especially for polling ATProto notifs 2023-10-18 11:03:21 -07:00
Ryan Barrett f292a7d957
authorization: allow actor to update/delete itself
for #566
2023-10-16 12:25:29 -07:00
Ryan Barrett 66cf3bfd42
bug fix for 55c8d9b 2023-10-16 06:54:06 -07:00
Ryan Barrett 55c8d9bec6
authorization: log updates, deletes, creates from the wrong actor
for #566. just logging for now, want to see if we're already hitting this at all.
2023-10-16 06:37:52 -07:00
Ryan Barrett d0da119b07
add opt out via #nobridge or #nobot text in user profile bio
fixes #666

(unfortunate issue number 😆)
2023-10-13 12:36:31 -07:00
Ryan Barrett ff168231d6
Object.actor_link: add image kwarg 2023-10-12 10:37:22 -07:00
Ryan Barrett 8f4c353936
Object.actor_link: add sized kwarg 2023-10-12 10:19:59 -07:00
Ryan Barrett 84e9b2bcfd
AP: strip @context from Object.as2 before storing in datastore
we don't do LD, and many other servers' @contexts are big, so this saves disk space.

fixes #426
2023-10-11 16:35:05 -07:00
Ryan Barrett dfab9f55d1
user page redesign: Object.actor_link: load actor from datastore
for #442
2023-10-11 12:25:39 -07:00
Ryan Barrett bd19cab870
Object.actor_link bug fix: handle actor/author objects with only id field
for #442
2023-10-11 12:25:39 -07:00
Ryan Barrett f37baeba58
user page redesign: misc tweaks
* separate source protocol from user in user labels
* make bridged protocol labels generic
* other visual tweaks

for #442
2023-10-11 12:25:39 -07:00
Ryan Barrett c1e0a08f72
user page redesign: add home, notifications pages
for #442
2023-10-11 12:25:38 -07:00
Ryan Barrett afa16d3864
start redesigning user pages
for #442
2023-10-11 12:25:38 -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 f1bb2df2ce
Object: don't log "wiping out existing [data field] 2023-10-09 16:41:05 -07:00
Ryan Barrett 5efd97d867
add Object.lock and new add, remove, and put methods 2023-10-07 13:51:59 -07:00
Ryan Barrett 37188f3cca
User.get_or_create: if propagate=True, always reload user profile remotely 2023-10-07 11:51:21 -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 7d8b1ba2e8
add fetch_blobs kwarg to Object.as_bsky 2023-10-05 15:47:04 -07:00
Ryan Barrett e96ab4654f
move creating ATProto users from User.get_or_create to new ATProto.create_for 2023-10-04 12:44:14 -07:00
Ryan Barrett ae25baba8c
drop obsolete User.href, it was only for OStatus
🫗
2023-10-04 12:30:20 -07:00
Ryan Barrett f85ab9ef41
noop: add a couple minor tests and comments 2023-09-29 11:32:29 -07:00
Ryan Barrett 4b94b4397c
User.get_or_create: fetch and propagate user profile object 2023-09-29 11:32:28 -07:00
Ryan Barrett bfabfabea7
move creating a new ATProto user from ATProto.send to User.get_or_create
in progress, still need to load user profile object and write it to ATProto repo
2023-09-29 11:32:28 -07:00
Ryan Barrett ad0a942034
switch webfinger and AP actors to mostly protocol subdomains
except Web, it still mostly serves on fed.brid.gy for backcompat, don't want to change existing Web users' AP actor ids.
2023-09-26 16:43:48 -07:00
Ryan Barrett a9fcc167f6
replace User.readable_id computed property with handle 2023-09-25 15:08:14 -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 021df15f7e
Object.as1 from bsky: pass repo DID, handle, PDS to granary 2023-09-24 20:02:09 -07:00
Ryan Barrett 452e49134d
add User.profile_id, implement in ATProto 2023-09-22 15:40:22 -07:00
Ryan Barrett 0d2ec18edd
add ids.convert_handle 2023-09-22 11:42:08 -07:00
Ryan Barrett e967bb4ada
start centralizing id conversion into new ids.py file 2023-09-22 11:42:08 -07:00
Ryan Barrett c1880569b8
User.get_by_copy => get_by_copies 2023-09-19 21:12:53 -07:00
Ryan Barrett 5107d003fe
Object.as1: genericize converting actor/author id from copy to original 2023-09-19 19:59:28 -07:00
Ryan Barrett 134416cd7b
genericize User.get_by_atproto_did to get_for_copy 2023-09-19 16:48:16 -07:00
Ryan Barrett bb18b5ee0d
add new User.copies property 2023-09-19 16:07:11 -07:00
Ryan Barrett dcbf16db6e
Object.as1 conversion from bsky, injecting actor/author
prefer user id to profile object id, default to AT URI repo DID
2023-09-18 11:52:17 -07:00
Ryan Barrett 5b16386fbc
User.get_by_atproto_did and Object.as1 from bsky: support native ATProto users 2023-09-18 11:41:01 -07:00
Ryan Barrett a723be660e
Object.as1: inject actor/author when converting from bsky objects
...since they imply actor/author in the AT URI's repo DID.
2023-09-18 11:23:11 -07:00
Ryan Barrett 48e47f5f7d
add User.get_by_atproto_did 2023-09-17 22:38:33 -07:00
Ryan Barrett b45635b125
noop: move canonicalizing AT URIs TODO from ATProto to Object 2023-09-14 16:52:22 -07:00
Ryan Barrett 077b5a97bc
ATProto.send: populate Object.copies with local record's AT URI 2023-09-14 10:20:04 -07:00
Ryan Barrett d3b3ff47f5
atproto: start on polling notifications
lots more to do here, 8 new TODOs in this commit 😆
2023-09-14 09:42:11 -07:00
Ryan Barrett 61b585e715
for Objects for ATProto records, require at:// URIs to have DID repos
don't allow handles. https://atproto.com/specs/at-uri-scheme
2023-09-13 12:51:34 -07:00
Ryan Barrett 165a403353
drop User.k256_pem, use arroba's AtpRepo.signing_key/rotation_key instead 2023-09-08 21:52:46 -07:00
Ryan Barrett 6ea7813242
start on new hub service for ATProto and eventually Nostr websockets 2023-09-05 12:06:07 -07:00
Ryan Barrett abf583952c
first pass at ATProto.send 2023-09-01 12:07:21 -07:00
Ryan Barrett 3ff42f0cd4
User.p256_key = k256_key, for ATProto 2023-09-01 07:51:23 -07:00
Ryan Barrett fd4b40fe7c
implement default User.ap_actor() 2023-08-31 11:49:10 -07:00
Ryan Barrett e18dabf510
implement ATProto.target_for, .fetch for at:// URIs 2023-08-31 10:48:28 -07:00
Ryan Barrett 96b63487fa
implement ATProto.fetch for DIDs 2023-08-30 20:59:53 -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 53518a3e4d
AP: handle Follow activities sent to shared inbox
fixes https://console.cloud.google.com/errors/detail/CKCyj4Cml--vUw;time=P30D?project=bridgy-federated
2023-08-09 11:26:36 -07:00
Ryan Barrett 9211aa3cae
bug fixes for Object.clear and get_or_create
be more careful about clearing and preserving as2/mf2/bsky/our_as1 properties

discovered by @jamietanna, thanks for reporting Jamie!
2023-08-08 10:26:00 -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 b57c96d7d5
move AtpNode to arroba 2023-07-26 09:02:23 -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 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 57350ab81a
switch from Object.users + labels to users + notify + feed lists
needed to distinguish an activity's owners from who it should notify from who should see it in their feeds.

also, unrelated, start sending stop-following activities.

in progress, test_web and test_activitypub still need updating.
2023-07-17 05:34:56 -10:00
Ryan Barrett 89ff89ef30
merging receive: Object.as1: postprocess mf2, if no id, use url
for #529
2023-07-11 13:25:31 -07:00
Ryan Barrett 2c861dbbf4
merging receive: if incoming object has no id (eg web/mf2), default to URL
for #529
2023-07-11 13:25:30 -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 ee3a596dbb
Summary merging Protocol/Web receive: change receive to take Object
for #529
2023-07-11 13:25:29 -07:00
Ryan Barrett 3f9ee02126
Object.get_or_create: populate .new and .changed 2023-07-11 13:25:29 -07:00
Ryan Barrett 3ceeae418f
add Object.activity_changed 2023-07-11 13:25:29 -07:00
Ryan Barrett 80e63e0fe9
add Object.get_or_create 2023-07-11 13:25:29 -07:00
Ryan Barrett 08d8c163e5
prune down logging of object writes 2023-07-11 13:25:28 -07:00
Ryan Barrett be7aa50eac
start merging web.webmention_task into Protocol.receive
for #529
2023-07-11 13:25:28 -07:00
Ryan Barrett 0caca9243e
add common.add to add to repeated properties only if not already there
tried a bunch of other more sophisticated ways to do this in snarfed/webutil@280a93e092 (plus snarfed/webutil@6cb9c1f719), tried a custom repeated property class that acted like a set instead of a list, but couldn't get it to work reliably or compatibly enough.
2023-06-29 22:15:07 -07:00
Ryan Barrett ee52a7b1c6
User.load_multi bug fix: handle when obj_key points to nonexistent entity
fixes https://console.cloud.google.com/errors/detail/COGUnu_nvbzluwE;time=P30D?project=bridgy-federated
2023-06-29 13:47:16 -07:00
Ryan Barrett 342f67dfa2
Protocol.load bug fix, leave new/changed None if we don't know for sure
eg if local is False
2023-06-28 15:27:11 -07:00
Ryan Barrett a5466e34ca
minor noop refactoring to web._targets() to make it use Target directly 2023-06-28 14:45:14 -07:00
Ryan Barrett 9140318f4a
generalize Protocol.accept_follow, other bug fixes in Protocol.receive
for #529, fixes https://console.cloud.google.com/errors/detail/CMbJ6a6j56LErwE;time=P30D?project=bridgy-federated
2023-06-26 20:22:55 -07:00
Ryan Barrett 70a9ed52b7
stop logging when a User has more than one data source populated 2023-06-23 13:20:26 -07:00
Ryan Barrett cae406e6c4
don't allow BF domains in ActivityPub or Web ids
also other ActivityPub id validation. #558
2023-06-23 12:22:37 -07:00
Ryan Barrett 65b4f1495f
Protocol.receive: fail "intra-BF" activities from ourselves
for #558
2023-06-23 11:20:29 -07:00
Ryan Barrett ab1c28ee4d
noop, lint fixes from flake8
remaining:

$ flake8 --extend-ignore=E501 *.py tests/*.py
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details
activitypub.py:15:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
activitypub.py:36:1: F401 'web' imported but unused
activitypub.py:48:1: E302 expected 2 blank lines, found 1
activitypub.py:51:9: F811 redefinition of unused 'web' from line 36
app.py:6:1: F401 'flask_app.app' imported but unused
app.py:9:1: F401 'activitypub' imported but unused
app.py:9:1: F401 'convert' imported but unused
app.py:9:1: F401 'follow' imported but unused
app.py:9:1: F401 'pages' imported but unused
app.py:9:1: F401 'redirect' imported but unused
app.py:9:1: F401 'superfeedr' imported but unused
app.py:9:1: F401 'ui' imported but unused
app.py:9:1: F401 'webfinger' imported but unused
app.py:9:1: F401 'web' imported but unused
app.py:9:1: F401 'xrpc_actor' imported but unused
app.py:9:1: F401 'xrpc_feed' imported but unused
app.py:9:1: F401 'xrpc_graph' imported but unused
app.py:9:19: E401 multiple imports on one line
models.py:19:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
models.py:364:31: E114 indentation is not a multiple of four (comment)
models.py:364:31: E116 unexpected indentation (comment)
protocol.py:17:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
redirect.py:26:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
web.py:18:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
webfinger.py:13:1: F401 'oauth_dropins.webutil.util.json_loads' imported but unused
webfinger.py:110:13: E122 continuation line missing indentation or outdented
webfinger.py:111:13: E122 continuation line missing indentation or outdented
webfinger.py:131:13: E122 continuation line missing indentation or outdented
webfinger.py:132:13: E122 continuation line missing indentation or outdented
webfinger.py:133:13: E122 continuation line missing indentation or outdented
webfinger.py:134:13: E122 continuation line missing indentation or outdented
tests/__init__.py:2:1: F401 'oauth_dropins.webutil.tests' imported but unused
tests/test_follow.py:11:1: F401 'oauth_dropins.webutil.util.json_dumps' imported but unused
tests/test_follow.py:14:1: F401 '.testutil.Fake' imported but unused
tests/test_models.py:156:15: E122 continuation line missing indentation or outdented
tests/test_models.py:157:15: E122 continuation line missing indentation or outdented
tests/test_models.py:158:11: E122 continuation line missing indentation or outdented
tests/test_web.py:12:1: F401 'oauth_dropins.webutil.util.json_dumps' imported but unused
tests/test_web.py:17:1: F401 '.testutil' imported but unused
tests/test_web.py:1513:13: E128 continuation line under-indented for visual indent
tests/test_web.py:1514:9: E124 closing bracket does not match visual indentation
tests/testutil.py:106:1: E402 module level import not at top of file
tests/testutil.py:107:1: E402 module level import not at top of file
tests/testutil.py:108:1: E402 module level import not at top of file
tests/testutil.py:109:1: E402 module level import not at top of file
tests/testutil.py:110:1: E402 module level import not at top of file
tests/testutil.py:301:24: E203 whitespace before ':'
tests/testutil.py:301:25: E701 multiple statements on one line (colon)
tests/testutil.py:301:25: E231 missing whitespace after ':'
2023-06-20 11:29:31 -07:00
Ryan Barrett 1821e90f36
add Object.as_as2() 2023-06-16 14:09:28 -07:00
Ryan Barrett 99bb564209
drop User.actor_as2
for #547
2023-06-16 13:28:33 -07:00
Ryan Barrett d3c4415cd3
migrate User.actor_as2 to obj key pointing to Object
for #547
2023-06-15 21:23:31 -07:00
Ryan Barrett 435389d0b9
move User.has_redirects, .redirects_error, and .has_hcard to Web
confirmed that no prod ActivityPub entities have values for any of these properties
2023-06-14 14:36:30 -07:00
Ryan Barrett 65e1479d88
don't allow Followers from and to the same protocol
also make from and to required
2023-06-13 20:58:28 -07:00
Ryan Barrett 48c40c10a8
add Protocol.for_id and .owns_id
fixes #548
2023-06-13 13:21:30 -07:00
Ryan Barrett cb1f80832f
AP users: add Protocol.ABBREV, Protocol.OTHER_LABELS
for #512
2023-06-11 08:14:17 -07:00
Ryan Barrett 510cd036bf
AP users: add Protocol.for_domain and for_request
getting ready to serve per-protocol subdomains, eg nostr.brid.gy, ap.brid.gy, etc

for #512
2023-06-10 19:55:08 -07:00
Ryan Barrett c98ab3f2d5
AP users: Object schema change, domains => users
also for AP => wm, only try to send webmentions to domains that we already have an existing Web user for. the vast majority of targets are fediverse URLs, and we were trying to send them all wms, ie at least running wm discovery and finding nothing. harmless, but a waste.
2023-06-09 12:56:45 -07:00
Ryan Barrett 3972b31cd1
AP users: drop deprecated Follow.src, dest, and last_follow properties
for #512
2023-06-08 16:04:37 -07:00
Ryan Barrett 7c82bf7ec5
AP users: finish migrating Follower from string domains/ids to User keys
for #512
2023-06-07 19:06:44 -07:00
Ryan Barrett 9cb8c1f9f2
AP users: start migrating Follower from string domains/ids to User keys
for #512
2023-06-07 12:43:48 -07:00
Ryan Barrett 9a75d10f54
move Model.username() to Web 2023-06-04 16:10:37 -07:00
Ryan Barrett fe27742b80
AP users: promote ActivityPub.label_id computed prop to User.readable_id
and drop ActivityPub.get_by_id() override, move logic to user() page handler. fixes 'Only ancestor queries are allowed inside transactions.'

for #512
2023-06-03 21:48:15 -07:00
Ryan Barrett daba73ce38
update a few user page links in the web UI, /user/ => /web/
for #512
2023-06-03 08:03:38 -07:00
Ryan Barrett c41b55a199
Web.fetch: switch back to raising instead of returning empty Object
raise new custom NoMicroformats exception
2023-06-03 07:28:01 -07:00
Ryan Barrett d9cd5d14b9
AP users: fetch user on demand on /[actor] if we don't already have it
also change Web.fetch() to allow missing mf2 instead of raising exception. we now create Web users with None for mf2 property if the site has no mf2.

for #512
2023-06-02 12:55:07 -07:00
Ryan Barrett ca64793fff
AP users: add User.name() and label_id(), ActivityPub.address computed property
for #512
2023-06-01 21:37:58 -07:00
Ryan Barrett 958f81ddd1
AP users: rename [is_]homepage => [is_]web_url, move into Protocol subclasses
for #512
2023-05-31 18:47:40 -07:00
Ryan Barrett 28eabd07a3
create AP users on inbox delivery for an indirect or nonexistent Web user
for #512
2023-05-31 13:17:17 -07:00
Ryan Barrett 086c6d032c
minor noop User tweak, domain => id 2023-05-31 12:38:00 -07:00
Ryan Barrett 56f18f5d9a
AP users: make User.ap_actor/ap_address abstract, implement in subclasses
for #512
2023-05-31 10:47:09 -07:00
Ryan Barrett 35060c172a
switch actor_id() and address90 back to User methods, to be implemented by subclasses
partially reverts 9e906f18e4
2023-05-31 10:10:14 -07:00
Ryan Barrett 9e906f18e4
move address, actor_id from User to activitypub.py, /web-site to web.py
for #512
2023-05-30 17:24:49 -07:00
Ryan Barrett 29f1a1d4ac
AP users: start parameterizing URLs, including UI pages and AP endpoints
user pages now have /[protocol]/ prefix, AP endpoints have /ap/ prefix. for #512
2023-05-30 16:38:58 -07:00
Ryan Barrett 8d4228b811
AP users: change web UI user page paths from /user/... to /[protocol]/...
for #512
2023-05-30 14:08:47 -07:00
Ryan Barrett 47b04f5574
rename Web.LABEL from 'webmention' to 'web' 2023-05-30 12:15:36 -07:00
Ryan Barrett 93f621aaf5
AP users: start to replace external with indirect, starting with webfinger
#512
2023-05-29 20:16:15 -07:00
Ryan Barrett 624355d85a
AP users: add new User.direct property
direct users signed up or otherwise interacted with BF explicitly, indirect users didn't
2023-05-29 19:37:41 -07:00
Ryan Barrett b7bebb4075
move base64_to_long, long_to_base64 to common 2023-05-27 14:58:22 -07:00
Ryan Barrett c8b2103e13
rename Webmention class => Web, webmention.py => web.py 2023-05-26 17:40:29 -07:00
Ryan Barrett 51fd119c02
fix bug in models.reset_protocol_properties
added in eaa4e5333a
2023-05-26 16:36:45 -07:00
Ryan Barrett eaa4e5333a
start to make User subclasses for each protocol
#512
2023-05-26 16:07:36 -07:00
Ryan Barrett 15e3daff5e
switch outbound webmention source URLs from /render?id=... to /convert/...
#512
2023-05-24 16:32:00 -07:00
Ryan Barrett af95521759
user page bug fix, add missing import
fixes https://console.cloud.google.com/errors/detail/COHl8dmZ9-i4Lw;time=P30D?project=bridgy-federated
2023-05-24 06:57:34 -07:00
Ryan Barrett cf86f4d808
AP users: extract out Protocol.serve() method
#512
2023-05-23 21:30:57 -07:00
Ryan Barrett 0ab3698db7
Bluesky: move most ATProto code to separate arroba library
https://github.com/snarfed/arroba
2023-05-06 14:41:06 -07:00
Ryan Barrett 64f4f62ae9
bluesky: add models.AtpNode for storing repo blocks 2023-04-28 12:02:26 -07:00
Ryan Barrett e303f55fdf
models.User: generate and store an ECC P-256 keypair
for AT Proto
2023-04-25 14:04:29 -07:00
Ryan Barrett d2ab48b23e
switch circular imports to runtime imports; split out flask_app.py from app.py
runtime imports are just as bad, but...meh. eventually I'll untangle them for real. #486
2023-04-18 17:18:17 -07:00
Ryan Barrett b39d673f12
add Object.expire property for datastore TTL to garbage collect old Objects
right now, auto-delete some ephemeral activities after 90d. for #456. https://cloud.google.com/datastore/docs/ttl
2023-04-18 09:16:16 -07:00
Ryan Barrett 212f2b11ec
wm => AP: add delete support
fixes #30
2023-04-17 15:36:29 -07:00
Ryan Barrett 01125d38d8
/render : escape #s in object id URLs to ^^
fixes #469
2023-04-05 16:23:49 -07:00
Ryan Barrett 22ca59749e
stop using common.actor() in User.verify() 2023-04-04 22:06:13 -07:00
Ryan Barrett 1f40aedf27
webmention.py: unify homepage update logic, move fetching into fetch() 2023-04-04 18:02:41 -07:00
Ryan Barrett 629c1a2bd4
unify Object.new/changed generation into Protocol.load
also:
* switch back to preserving fragments in URL ids
* webmention.fetch: if URL id redirects, preserve original id in Object
2023-04-03 07:53:15 -07:00
Ryan Barrett 3a97ba587d
noop: Protocol.load: switch from @cached decorator to manual cache
...so that I can add a refresh kwarg that bypasses the cache
2023-04-02 20:36:23 -07:00
Ryan Barrett f836762b0f
big webmention.py refactoring
* use Objects properly
* use Object's mf2/AS2/AS1 conversion
* drop resuming partially completed deliveries
* use load, fetch, send
* get closer to unifying all activity handling into Protocol.receive
2023-04-01 19:13:51 -07:00
Ryan Barrett e41ce9216c
noop, rename Protocol.get_object => Protocol.load 2023-03-29 13:13:32 -07:00
Ryan Barrett 5493e2f297
add 'activity' to Object.labels automatically in new _pre_put_hook 2023-03-28 11:14:08 -07:00
Ryan Barrett 20f86c7de3
handle wm => AP with targets that we've already federated wm => AP
fixes https://console.cloud.google.com/errors/detail/CMHpr9L3ooGKeQ;time=P30D?project=bridgy-federated
2023-03-22 12:30:55 -07:00
Ryan Barrett 3538940e4f
add new Object.our_as1 property for activities we create or modify ourselves 2023-03-21 09:10:14 -07:00
Ryan Barrett fb5f7b3fb0
move current user into Flask g request-global 2023-03-20 14:28:14 -07:00
Ryan Barrett 5e3c623552
add User.actor_id() 2023-03-19 09:34:42 -07:00
Ryan Barrett d8932d4e76
add mf2 to user page dashboard to make a notifications feed
for #442
2023-03-14 11:27:10 -07:00
Ryan Barrett ffd8810b44
start to separate logic from protocols with new Protocol/ActivityPub classes
for #388
2023-03-10 07:36:50 -08:00