Wykres commitów

223 Commity (1fc67fcd880e9877e8c65a3a0698b08130202451)

Autor SHA1 Wiadomość Data
Ryan Barrett 70dd6d3ceb
minor logging optimizations
for https://github.com/snarfed/bridgy-fed/issues/1149
2024-08-02 08:03:44 -07:00
Ryan Barrett 100a208e5e
add allow_opt_out to Protocol.key_for, User.get_or_create, Protocol.receive internal
for #1204
2024-07-23 19:26:30 -07:00
Ryan Barrett 4e958f68e2
Web feed polling: don't use user profile images as post metaformats images
for #1191
2024-07-23 13:05:27 -07:00
Ryan Barrett b90cdefacf
Web.fetch bug fix: only default metaformats on for home pages
fixes 45df0ea
2024-07-23 11:54:56 -07:00
Ryan Barrett 45df0ea410
Web feed polling: if an entry doesn't have an image, fetch it from metaformats 2024-07-22 18:11:49 -07:00
Ryan Barrett 3b37890635
web feed poll: accept text/xml as well as application/xml
https://bsky.app/profile/kerim.oxus.net/post/3kxtd6hvpt62s

https://stackoverflow.com/questions/4832357/whats-the-difference-between-text-xml-vs-application-xml-for-webservice-respons
2024-07-21 20:08:14 -07:00
Ryan Barrett f1713e68d9
drop a bunch of log messages from info to debug
...and other logging tweaks

for https://github.com/snarfed/bridgy-fed/issues/1060
2024-07-18 14:15:12 -07:00
Ryan Barrett 6b1290eb53
whoops, revert the Web.get_or_create change in 4ff28ca377 2024-07-15 20:22:47 -07:00
Ryan Barrett 4ff28ca377
minor noop refactorings 2024-07-15 20:09:33 -07:00
Ryan Barrett ee62334a93
turn on web <=> Bluesky!
for #1034
2024-07-15 19:40:10 -07:00
Ryan Barrett a2c382651a
Web.get_or_create: noop: refactor to use ids.normalize_user_id
for #1034
2024-07-15 18:08:10 -07:00
Ryan Barrett b606924d63
refactor SUPPORTED_AS1_TYPES usage into new Protocol.check_supported method 2024-07-04 21:11:38 -07:00
Ryan Barrett 850d681f83
add Protocol.SUPPORTED_AS1_TYPES 2024-07-04 16:58:06 -07:00
Ryan Barrett 84949f265b
Web.owns_id: check TLD against brevity's allowlist
fixes #1115
2024-06-20 23:36:01 -07:00
Ryan Barrett 7ac501cfff
Web.fetch, get_or_create: only load or create protocol bot users that already exist
fixes https://console.cloud.google.com/errors/detail/CM-n8tK-5LXhIw;time=P7D?project=bridgy-federated
2024-06-20 13:41:39 -07:00
Ryan Barrett 441849a22a
Revert "Revert "start using an ndb in memory global cache in the frontends and router""
This reverts commit 0cbcf81ecc.

trying again!
2024-06-04 14:27:02 -07:00
Ryan Barrett 83893d0ea7
HTTP caching headers: switch to flask_util.headers
for #432, fixes https://console.cloud.google.com/errors/detail/CMK10__x4ZbgbQ;time=P7D;refresh=true?project=bridgy-federated
2024-06-04 14:19:39 -07:00
Ryan Barrett 3cb9a9366d
Web, ATProto: skip add activities, eg Bluesky list items
hopefully fixes https://console.cloud.google.com/errors/detail/CP7I5eaZj-_TxgE;time=P7D;refresh=true?project=bridgy-federated
2024-06-04 14:10:21 -07:00
Ryan Barrett 423b5511dd
ATProto: Web.send: skip polls (objectType question)
for https://console.cloud.google.com/errors/detail/CPvA_dLO4r_hIA;time=P30D;refresh=true?project=bridgy-federated
2024-06-04 12:31:38 -07:00
Ryan Barrett 918b2f04ee
Web.send: skip polls (objectType question)
for https://console.cloud.google.com/errors/detail/CPvA_dLO4r_hIA;time=P30D;refresh=true?project=bridgy-federated
2024-06-04 12:03:34 -07:00
Ryan Barrett bad49575fb
Web: always use fetched URL as id, not u-url
fixes #829, cc #566
2024-06-03 16:20:46 -07:00
Ryan Barrett 5266974731
Protocol.for_id: make Web own bot actor AP ids, not bot protocol 2024-06-02 08:21:18 -07:00
Ryan Barrett a2376f8f14
prune more logging messages 2024-06-01 07:17:44 -07:00
Ryan Barrett 0cbcf81ecc
Revert "start using an ndb in memory global cache in the frontends and router"
This reverts commit 7e77d7a463.

This slows down receive task processing, tasks all start taking longer and longer, can't figure out why. some kind of lock starvation in the global cache?

will experiment with this more in the ndb-global-cache branch.
2024-06-01 07:04:38 -07:00
Ryan Barrett 64324db3da
Web.poll_feed_task: limit to 10 items per poll 2024-05-31 13:46:01 -07:00
Ryan Barrett 7e77d7a463
start using an ndb in memory global cache in the frontends and router
lol yolo 982f8a70df/google/cloud/ndb/global_cache.py (L200-L202)

> Not intended for production use. Uses a single process wide dictionary to
> keep an in memory cache. For use in testing and to have an easily grokkable
> reference implementation. Thread safety is potentially a little sketchy.
2024-05-31 13:08:25 -07:00
Ryan Barrett d0ca690dc4
HTTP Cache-Control header bug fix, use integer seconds for max-age, not float
for #432
2024-05-30 17:12:45 -07:00
Ryan Barrett 9c4888b02e
switch from flask_util.cached to HTTP caching, suppress some verbose logging 2024-05-30 14:55:35 -07:00
Ryan Barrett 8f5d8221a9
add ids.profile_id, use everywhere
for #566
2024-05-29 16:18:15 -07:00
Ryan Barrett f2a64c8b5c
Object.get_or_create: rename actor => authed_as, add to all calls
for #566
2024-05-28 16:07:32 -07:00
Ryan Barrett e26a845592
web.webmention_task: use domain as authed_as, not homepage URL
for #566
2024-05-28 15:01:45 -07:00
Ryan Barrett f6798f2725
abstract "bridged from Bridgy Fed" profile label across protocols
for #976
2024-05-14 16:03:42 -07:00
Ryan Barrett f533479e0b
noop: drop unused flask.g imports 2024-05-07 17:14:59 -07:00
Ryan Barrett c608ecaa36
noop: misc constants cleanup 2024-05-05 16:35:23 -07:00
Ryan Barrett 2bf526ab7c
refactor validating handles in ATProto and elsewhere
for https://github.com/snarfed/bridgy-fed/issues/982
2024-05-03 15:18:16 -07:00
Ryan Barrett 4b95d49ccc
ids.translate_handle: convert _ and ~ chars to - for Bluesky
hopefully fixes #982
2024-05-02 15:41:41 -07:00
Ryan Barrett cbe4b59206
convert Protocol.is_enabled_to to an instance method
next commit will move it to User
2024-04-27 20:27:33 -07:00
Ryan Barrett 0e8b9ece7e
set up ap.brid.gy protocol bot user 2024-04-23 13:54:29 -07:00
Ryan Barrett 3f1d860bba
AP: add test for following bot user to enable protocol
also relax Web.put check on id to allow internal domains for bot users
2024-04-23 10:17:13 -07:00
Ryan Barrett d4a56127d9
incoming webmentions: stop converting home pages to update activities
pass Protocol.receive the bare actor object, let it convert to update activity, like with posts etc
2024-04-23 06:50:55 -07:00
Ryan Barrett 0c41f0e081
remove /webmention-interactive (for old Web-specific update profile button) 2024-04-22 20:25:48 -07:00
Ryan Barrett 34692abc60
handle protocol bot users in webfinger, ids.translate_handle, Web.owns_handle
for #880
2024-04-22 14:01:09 -07:00
Ryan Barrett b9551c4de7
adjust Web.owns_id to say it owns protocol bot user domains but not their pages
eg bsky.brid.gy True, https://bsky.brid.gy/ True, https://bsky.brid.gy/foo False.

also move our internal synthetic UI-initiated follow ids from https://fed.brid.gy/web/... to under the user's own domain. hopefully this won't break anything 🤞
2024-04-22 11:58:01 -07:00
Ryan Barrett ed78090d2c
expand User.ap_subdomain to allow protocol subdomains like bsky
part of setting up per-protocol bot users for #880
2024-04-22 11:12:03 -07:00
Ryan Barrett e1f9021696
AP instance actor: move AS2 JSON files, start adding per-protocol bot users 2024-04-21 16:35:17 -07:00
Ryan Barrett 0c37d94191
ids.translate_* noop refactoring: from_proto => from_, to_proto => to 2024-04-20 21:03:06 -07:00
Ryan Barrett 2886ae180d
remove common.ENABLED_PROTOCOLS, use Protocol.DEFAULT_ENABLED_PROTOCOLS instead
also use is_enabled_to in user page template
2024-04-18 16:39:15 -07:00
Ryan Barrett 259b7d72dd
start on conditional opt in
* add Protocol.DEFAULT_ENABLED_PROTOCOLS
* add User.enabled_protocols
* move common.is_enabled to Protocol.is_enabled_to, include opt out/in
2024-04-17 16:43:10 -07:00
Ryan Barrett 7009267bb0
use new handle_or_id kwarg in common.is_enabled calls 2024-04-10 11:49:53 -07:00
Ryan Barrett 663063e06c
test_integrations: add ATProto => Web follow 2024-03-12 21:41:05 -07:00