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
db29ad7757
docs: fix docstring formatting, other tweaks
2023-10-05 23:32:31 -07:00
Ryan Barrett
6442acb244
/bridge-user flashed message, link user handle
2023-10-05 22:28:36 -07:00
Ryan Barrett
42a4cb32e6
/bridge-user minor UI bug fix
2023-09-29 14:26:24 -07:00
Ryan Barrett
616f347d76
/bridge-user: only allow AP and Web source users
2023-09-29 13:38:50 -07:00
Ryan Barrett
56c5909b84
add /bridge-user page to propagate a new user into ATProto
...
for #647
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
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
57b91a9e49
user page snippet rendering: strip HTML from content
...
fixes #637
2023-09-08 14:26:19 -07:00
Ryan Barrett
eb54ec62af
activity feed rendering: convert Mastodon etc URLs to more readable @ names
2023-08-26 09:47:41 -07:00
Ryan Barrett
de5191a10e
bug fix for web user updat profile button
...
for synthesized update/create/delete activities, switch actor id from protocol-specific AP to protocol-agnostic web URL.
thanks @capjamesg for reporting!
2023-08-02 19:12:09 -07:00
Ryan Barrett
b2b5383271
fix authors in RSS and Atom feeds
2023-07-28 15:53:56 -07:00
Ryan Barrett
ca1d0dcc01
feeds: also load repost objects from separate Objects
...
for #419 , follows 47b90c8
2023-07-20 07:26:16 -10:00
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
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
8176cd1f56
Activity => Object: update pages.py
...
#286
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
e6889b4cf6
activities UI bug fix for rendering profile updates
2023-01-23 20:46:12 -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
74ebbc428b
add new common.fetch_followers() fn, use in UI, AP collections, and XRPCs
...
for #264
2023-01-19 15:29:52 -08:00
Ryan Barrett
0c7048d93f
bug fix for followers/ing UI pages
...
bug was introduced in 02aa3e9801
2023-01-19 07:52:41 -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
02aa3e9801
refactoring: move fetch_page from pages to common
2023-01-18 22:19:51 -08:00
Ryan Barrett
6d354c1e34
drop old deprecated /responses URL
2023-01-18 21:44:02 -08:00
Ryan Barrett
f8fbf1391c
refactoring: unify followers and following UI page handlers
2023-01-18 21:25:54 -08:00
Ryan Barrett
a66fe4bdc2
bluesky: implement app.bsky.feed.getTimeline
...
based on stored Activity entities. missing auth, otherwise pretty complete.
2023-01-13 15:35:05 -08:00
Ryan Barrett
341f08e5f9
minor tweak to activity rendering for unfollow
2023-01-09 22:58:35 -08:00
Ryan Barrett
9bb82e6db3
follow UI: store last_follow, misc bug fixes
2023-01-08 12:03:56 -08:00
Ryan Barrett
c50f0e0106
add follow UI to user/[domain]/following
...
for #351
2023-01-07 09:34:55 -08:00
Ryan Barrett
2bbe17b967
show reposts/boosts in feeds
2022-12-27 09:55:59 -08:00
Ryan Barrett
ac0e0e1b49
bug fix for UI paging of activities with the after param
...
sort query ascending so we get the activities immediately after the paging param,, then sort results in memory descending for UI
2022-12-14 10:11:19 -08:00
Ryan Barrett
39df9989d0
omit boosts from feeds
2022-12-07 09:32:00 -08:00
Ryan Barrett
6339fd6156
minor tweaks to /stats
2022-12-02 14:46:18 -08:00
Ryan Barrett
222be38a98
user page: redirect www-stripped users to non-www user pages
...
for #314
2022-12-02 11:08:24 -08:00
Ryan Barrett
5249bb5a4f
special-case www subdomains, use root domain if it redirects to www
...
for #314
2022-12-02 10:48:16 -08:00
Ryan Barrett
bd4d30f61c
add remote follow link rel to webfinger
...
https://socialhub.activitypub.rocks/t/what-is-the-current-spec-for-remote-follow/2020/11?u=snarfed
https://github.com/snarfed/bridgy-fed/issues/60#issuecomment-1325589750
and #60
2022-12-01 10:09:57 -08:00
Ryan Barrett
0363db65fa
handle new multi-valued url field in AS2 objects
...
snarfed/granary@79c512402b
2022-11-30 21:04:41 -08:00
Ryan Barrett
7359c0558d
user page bug fix: include active filter in follower/following count
2022-11-29 22:08:01 -08:00
Ryan Barrett
d2d0932893
refactor user name and profile picture links, add to user page and activities
2022-11-25 22:21:50 -08:00
Ryan Barrett
4fb36e32b4
/stats bug fix
2022-11-23 08:23:07 -08:00
Ryan Barrett
4c3ef9a230
extract out template for rendering user's addresses, add profile picture
...
fixes #304
2022-11-22 15:24:36 -08:00
Ryan Barrett
2279db46fc
start on AP followers/following collections
...
for #264
2022-11-21 18:47:08 -08:00
Ryan Barrett
2380f43fb3
minor UI tweaks to followers page
2022-11-21 16:08:00 -08:00
Ryan Barrett
252b250ebe
user page: handle multi-valued object
...
fixes #301
2022-11-21 07:27:45 -08:00
Ryan Barrett
fe8183b182
UI: de-dupe activities
...
for #261
2022-11-20 21:35:55 -08:00
Ryan Barrett
34593e2a1b
render human-friendly summaries of activities on /recent and user pages
...
for #261
2022-11-20 20:52:44 -08:00
Ryan Barrett
30d9f7c9a5
make verification accept fed.brid.gy redirects when running locally
2022-11-20 11:56:32 -08:00
Ryan Barrett
754d694823
verify UI bug fix: don't strip leading www. from domains
2022-11-20 07:44:03 -08:00