Wykres commitów

97 Commity (36d020eb77e0d860978e5fa53b090ced7b101483)

Autor SHA1 Wiadomość Data
Ryan Barrett 47b90c890e
/feed: load author/actor if it's in a separate Object
fixes #419. thanks again @gRegorLove!
2023-07-19 19:39:29 -10: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 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 dc385cd079
user page activity snippets: fix "replied" phrase 2023-06-14 16:20:25 -07:00
Ryan Barrett cb5e7bf8c7
noop, minor protocol generalization and cleanup
for #512
2023-06-10 15:07:26 -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 afbb453043
AP users: finish migrating follow.py to Follower schema with new from/to
for #512, fixes https://console.cloud.google.com/errors/detail/CPn404XJ2rC6rAE;time=P30D?project=bridgy-federated
2023-06-07 23:51:41 -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 797a0bbbb3
bug fix, don't redirect web users to readable_id
fixes #534
2023-06-07 12:14:49 -07:00
Ryan Barrett d30eccbe8b
AP users: make show protocol-specific UI like remote follow conditional
for #512
2023-06-04 10:13:02 -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 e05ddb0a45
AP users: serve ActivityPub user page with address (handle) in URL
eg /activitypub/@me@instance.com

for #512
2023-06-01 22:00:47 -07:00
Ryan Barrett 17ed24b6f5
AP users: switch ActivityPub.ap_address() to use as2.address()
for #512
2023-06-01 20:58:42 -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 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 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 64da82c4aa
noop, fix docstring 2023-04-25 21:01:45 -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 212f2b11ec
wm => AP: add delete support
fixes #30
2023-04-17 15:36:29 -07:00
Ryan Barrett c1359d2c0a
add issue object type to snippet rendering 2023-04-12 07:57:40 -07:00
Ryan Barrett 23a8f7cfda
fix snippet rendering for post and profile updates 2023-04-06 12:40:36 -07:00
Ryan Barrett 6dc4705a56
user page bug fix, handle AS1 inner objects with composite url values
fixes https://console.cloud.google.com/errors/detail/CNGc5drA4f7uOA;time=P30D?project=bridgy-federated
2023-03-23 22:04:46 -07:00
Ryan Barrett fb5f7b3fb0
move current user into Flask g request-global 2023-03-20 14:28:14 -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 41f26e2be3
update tests for snarfed/granary@15a6d88f76 2023-03-05 07:57:19 -08:00
Ryan Barrett 56dacb1258
more bug fixes for user page with Object with bare string id object
fixes https://console.cloud.google.com/errors/detail/CPORrJ7MxPCtZg;time=P30D?project=bridgy-federated
2023-03-03 10:30:41 -08:00
Ryan Barrett 126a766d40
bug fix for user page with Object with bare string id object
fixes https://console.cloud.google.com/errors/detail/COvA0I_cuN-o9gE;time=P30D?project=bridgy-federated
2023-03-03 10:07:54 -08: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 cc77f48b30
precompute "user not found" 404 page
...since we get a ton of requests for non-existing users from weird open redirect referrers: #422
2023-02-14 12:52:14 -08:00
Ryan Barrett f39c532ad3
add User.homepage, is_homepage() 2023-02-12 12:03:27 -08:00
Ryan Barrett 7e2fbd1ed0
make AP Deletes mark stored Objects deleted
for #409
2023-02-11 21:47:55 -08:00
Ryan Barrett f16338fc57
fix crash on followers/following pages with before/after query params
fixes https://console.cloud.google.com/errors/detail/CPnW-eq837TnswE;time=P30D?project=bridgy-federated , introduced in a140a60a7f
2023-02-09 08:26:30 -08:00
Ryan Barrett d5eac953d0
more error handling for signup UI flow when user's web site fetch fails
fixes #400
2023-02-08 20:28:30 -08:00
Ryan Barrett a140a60a7f
fix propagating the ?address=... query param into following UI page
for #414
2023-02-08 12:21:45 -08:00
Ryan Barrett c68e06654b
add nodeinfo
https://nodeinfo.diaspora.software/

for #401
2023-02-07 13:51:15 -08:00
Ryan Barrett b5a0386cd0
store home page URL in update profile Objects, render better in activities UI
fixes #407
2023-02-07 12:44:41 -08:00
Ryan Barrett 48252bf42d
user page activities UI: fall back to summary for content
for #286
2023-02-07 11:45:50 -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