Ryan Barrett
1821e90f36
add Object.as_as2()
2023-06-16 14:09:28 -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
bbcb8de44a
noop test refactoring: finally unify request context push/pop into testutil
2023-06-15 15:09:03 -07:00
Ryan Barrett
60a4a2bb9f
move domain non-TLD validation from webfinger into Web
...
fixes https://console.cloud.google.com/errors/detail/CMG7h4PJju67Og;time=P30D?project=bridgy-federated
2023-06-15 11:25:31 -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
cb1f80832f
AP users: add Protocol.ABBREV, Protocol.OTHER_LABELS
...
for #512
2023-06-11 08:14:17 -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
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
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
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
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
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
f933c7e237
AP users: serve AS2 for external homepage URLs
...
#512
2023-05-22 23:17:42 -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
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
01125d38d8
/render : escape #s in object id URLs to ^^
...
fixes #469
2023-04-05 16:23:49 -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
f4a86dcb82
update test for snarfed/granary@882426a9de
2023-03-31 20:28:25 -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
fb5f7b3fb0
move current user into Flask g request-global
2023-03-20 14:28:14 -07:00
Ryan Barrett
aeb2fd480a
tests: rename remaining test data hostnames to clarify web vs fediverse
...
followup to f6e5727602
2023-03-19 15:43:55 -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
106bbe623b
tests optimization: reuse same RSA key across Users
...
speeds up tests from ~22s to ~6s (!) on my laptop. for #398
2023-03-10 15:13:45 -08: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
Ryan Barrett
aa483ded0b
Object.type and object_ids fixes to handle missing as1
...
fixes https://console.cloud.google.com/errors/detail/CJ-U7Zq_s4bxgwE;time=P30D?project=bridgy-federated
2023-02-24 21:59:12 -06:00
Ryan Barrett
fd27dabe61
switch JSON properties to custom JSONProperty that works in web console UI
...
https://github.com/googleapis/python-ndb/issues/874#issuecomment-1442753255
2023-02-24 07:25:29 -06:00
Ryan Barrett
91a60c7e67
switch Object.as1 to be a ComputedProperty
2023-02-23 21:17:26 -06:00
Ryan Barrett
d1691b65c5
Object post put hook: don't add fragment ids to the common.get_object cache
2023-02-16 12:21:27 -08:00
Ryan Barrett
c540a8bee8
add test that Object put hook clears common.get_object cache
2023-02-16 08:21:56 -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
f39c532ad3
add User.homepage, is_homepage()
2023-02-12 12:03:27 -08:00
Ryan Barrett
f922ce89bb
user page: activities: render fediverse actor links as @-@
...
for #406
2023-02-06 21:08:52 -08:00
Ryan Barrett
2a1b199558
Activity => Object: user dashboard UI bug fixes, add missing Object index
2023-02-04 20:46:28 -08:00
Ryan Barrett
58e836b380
Activity => Object: update webmention.py
...
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett
cc453035c8
initial design of new Object model, implement it in render.py
2023-02-04 20:46:27 -08:00
Ryan Barrett
36349a5db9
add Follower.to_as2()
2023-01-19 06:49:39 -08:00
Ryan Barrett
c3edf3a68e
make Follower.to_as1() handle both inbound and outbound last_follow
...
...and use it in followers and following UI pages
2023-01-18 22:31:13 -08:00