Wykres commitów

104 Commity (acf474e2a9b21ef264f0be3afdeb50fe5fb1d161)

Autor SHA1 Wiadomość Data
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
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 7bb9785327
fix log message for Object.as2 vs mf2 vs bluesky 2023-02-24 11:48:48 -06:00
Ryan Barrett 76927ee487
Object.as1: temporarily demote assert to warning log 2023-02-24 10:02:06 -06:00
Ryan Barrett 5463a74e7e
switch Object.as1 to custom ComputedJsonProperty 2023-02-24 08:25:18 -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 e423bde6d0
unify logging for writing datastore entities into post put hook
and other logging tweaks
2023-02-14 15:38:42 -08:00
Ryan Barrett 588598c5ff
switch most uses of common.get_as2 to common.get_object 2023-02-14 14:56:27 -08:00
Ryan Barrett c2e6174330
add common.get_object() 2023-02-14 14:30:00 -08:00
Ryan Barrett 6446c8c421
convert Object.type and .object_ids to ComputedPropertys
https://googleapis.dev/python/python-ndb/latest/model.html#google.cloud.ndb.model.ComputedProperty
2023-02-13 21:43:49 -08:00
Ryan Barrett f39c532ad3
add User.homepage, is_homepage() 2023-02-12 12:03:27 -08:00
Ryan Barrett d72540fde7
move Activity model to scripts/activity_model.py 2023-02-11 18:11:30 -08:00
Ryan Barrett b739bd4cee
return 404 on requests for unknown users instead of automatically creating them 2023-02-07 18:28:52 -08:00
Ryan Barrett c143192aa4
user page activities UI: if actor has no displayName, default to username
#286
2023-02-07 08:24:24 -08:00
Ryan Barrett cb605e96c6
user page activities: if object is user, render as pretty user link
for #406
2023-02-06 21:28:40 -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 db4d765cf8
user page: activities: fix user actor rendering for UI follows
fixes #406
2023-02-06 20:30:08 -08:00
Ryan Barrett 18404f70e7
speed up tests by only using 1024 bit keys
fixes #398
2023-02-05 22:22:22 -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 9680f6f83e
Activity => Object: drop /recent, tweak feed queries, update datastore indices 2023-02-04 20:46:28 -08:00
Ryan Barrett 2c3a693b4d
Activity => Object: add script to migrate existing Activitys to Objects
#286

temporarily adds back Activity model definition, will remove again later.
2023-02-04 20:46:28 -08:00
Ryan Barrett 532ccb8ac1
Activity => Object: use StructuredProperty for Object.delivered etc, add protocol
#286

ndb implements StructuredProperty by hoisting each nested property into a
corresponding property on the parent entity, prefixed by the StructuredProperty's
name, eg delivered.uri, delivered.protocol, etc.

For repeated StructuredPropertys, the hoisted properties are all repeated on the
parent entity, and reconstructed into StructuredPropertys based on their order.

https://googleapis.dev/python/python-ndb/latest/model.html#google.cloud.ndb.model.StructuredProperty
2023-02-04 20:46:27 -08:00
Ryan Barrett f9891b6ef7
Activity => Object: add activity label, unify Objects for AP => wm
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett 4d2fcdd76f
Activity => Object: fully populate labels, source_protocol webmention
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett eafba6d7cd
Activity => Object: populate Object.type
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett 58e836b380
Activity => Object: update webmention.py
#286
2023-02-04 20:46:27 -08:00
Ryan Barrett 23aff3b176
Activity => Object: update follow.py 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 82547c9557
override User.get_by_id() to handle use_instead
fixes #403
2023-02-04 19:53:30 -08:00
Ryan Barrett 4a621eed65
bump RSA key length up from 1024 to 2048 bits
https://www.pycryptodome.org/src/public_key/rsa#Crypto.PublicKey.RSA.generate
fixes https://github.com/snarfed/bridgy-fed/security/code-scanning/10
2023-01-30 15:49:11 -08:00
Ryan Barrett bb2d3e03de
noop: convert a few %s'es to f-strings
thanks flynt! https://github.com/ikamensh/flynt
2023-01-24 12:17:24 -08:00
Ryan Barrett 378bb5dbf4
activities UI: handle empty Activity, source_mf2 without `items`
for #376
2023-01-23 19:20:31 -08:00
Ryan Barrett 1627ff667a
translate webmention from home page into profile (actor) Update
for #376, #331
2023-01-23 16:09:25 -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
Ryan Barrett 37e389447a
always store Follower.last_follow as AP/AS2 Follow activity
specifically, this switches storing outbound follows from inbound webmentions from AS1 to AS2.
2023-01-18 21:09:43 -08:00
Ryan Barrett 898b8545ac
bluesky: implement app.bsky.graph.getFollowers 2023-01-13 11:40:52 -08:00
Ryan Barrett 6520331627
incoming Follows: synthesize url into follow object stored in Activity
rendered mf2 HTML proxy pages (in render.py) fall back to redirecting to the follow's AS2 id field, but Mastodon's ids are URLs that don't load in browsers, eg https://jawns.club/ac33c547-ca6b-4351-80d5-d11a6879a7b0. so, set a synthetic URL based on the follower's profile. fixes #336
2023-01-12 12:28:34 -08:00
Ryan Barrett 91c4200bb3
follow UI: synthesize Follow activity id, store an Activity, link address, form bug fix 2023-01-08 07:11:22 -08:00
Ryan Barrett 7ac1006021
background task bug fix: override task runner host
we were using request.host_url blindly, which was fed.brid.gy for user-facing requests, but bridgy-federated.uc.r.appspot.com for tasks. #335
2023-01-05 15:05:35 -08:00
Ryan Barrett fe5c3947a8
drop OStatus! it's been unused for years
fixes #282
2023-01-04 19:22:11 -08:00
Ryan Barrett 72b8dea8a0
Model.verify: minor redirect error message tweak 2022-12-06 22:41:55 -08:00
Ryan Barrett f72b3abfa0
Model.verify: add error message for non-2xx redirects
for #337
2022-12-06 22:37:56 -08:00
Ryan Barrett a95c2c4b55
incoming follow bug fix, handle www and use_instead
fixes #314
2022-12-06 14:09:44 -08:00
Ryan Barrett 71d4c260b3
add User.created and updated properties 2022-12-02 14:46:09 -08:00