Wykres commitów

237 Commity (3e733e798d2e8b80e236f6b3bf7e641a23b243a6)

Autor SHA1 Wiadomość Data
Ryan Barrett 3e733e798d
add Protocol.migrate_in, implement in ATProto
for importing ATProto repos from external PDSes, https://github.com/snarfed/bridgy-fed/issues/1137, https://github.com/snarfed/bounce/issues/12
2025-03-09 09:18:24 -07:00
Ryan Barrett c08b8c2bfd
add migrate-to DM command
for #330, snarfed/bounce#17
2025-03-05 13:12:14 -08:00
Ryan Barrett a30965dfd6
DMs: update misconfigured test, misc bug fixes
assert_sent wasn't working when we didn't actually send anything because we used zip(), which silently truncated to the shortest sequence. ugh.
2025-02-05 16:53:13 -08:00
Ryan Barrett 0f7289b706
drop Object.labels 2025-01-31 14:57:56 -08:00
Ryan Barrett ca86534f21
Protocol.receive: when fetching actor, fetch profile id
also update tests to test profile vs actor id with Fake users more
2025-01-27 16:47:33 -08:00
Ryan Barrett 264905ac20
Protocol.receive bug fix: preserve actor id if we fetch actor profile
we were accidentally using the profile id, which broke some ATProto => AP delivery, #1720
2025-01-27 14:48:07 -08:00
Ryan Barrett 893f8d1b22
tests noop: move ActivityPub.assert_deliveries => TestCase.assert_ap_deliveries 2025-01-27 14:48:07 -08:00
Ryan Barrett 23e07b6a2e
activitypub: stop checking whether instance domain is in Web.manual_opt_out
we do something like 10qpm of the initial query that loads the manual_opt_out Web domains, I guess due to spinning up new frontend instances
2025-01-24 10:36:40 -08:00
Ryan Barrett d863add480
first pass at not storing CRUD activities any more
for #1360

good! but not done yet, need to fix populating Object.notify/feed, handling user vs profile ids
2025-01-20 13:45:12 -08:00
Ryan Barrett 5f55edd16f
TestCase.assert_object: remove unused delivered_protocol kwarg
was used for per-inbox delivery tracking
2025-01-16 19:42:16 -08:00
Ryan Barrett 32a60c980c
updates for ndb context caching everything: Object.new/changed logic, tests
for #1149, 18aa302da
2025-01-13 16:19:32 -08:00
Ryan Barrett ae315a4257
add new Protocol.DEFAULT_SERVE_USER_PAGES config attr
for #1043
2025-01-10 11:36:22 -08:00
Ryan Barrett e8b201dc33
extract memcache logic out into new memcache.py file 2025-01-09 17:10:05 -08:00
Ryan Barrett 1aca15ee1e
drop User.direct
subsumed by User.enabled_protocols. for #973
2025-01-06 20:06:23 -08:00
Ryan Barrett 56aca5bdba
common.create_task: don't crash if we're outside a request context
oops 😀

fixes https://console.cloud.google.com/errors/detail/CI37sYuA9Z6Q4gE;time=PT1H;locations=global?project=bridgy-federated&inv=1&invt=AbkfaA
2024-12-18 16:16:09 -08:00
Ryan Barrett 63c0e25deb
drop per-target delivery tracking
sad, it's useful, but it's too expensive. for #1501, #1149
2024-12-14 20:53:47 -08:00
Ryan Barrett 5d6d68b5e7
cache models.get_original_user/object_key queries in memcache
adds new generic common.memcache_memoize decorator for caching any function's output in memcache. for #1149
2024-12-11 20:17:36 -08:00
Ryan Barrett da302c2376
Protocol.receive and ATProto.send: detect CRUD of object without id
fixes https://console.cloud.google.com/errors/detail/CO_yiJ_PrYSuvQE;locations=global;time=P30D?project=bridgy-federated&inv=1&invt=AbjgeA
2024-12-07 15:52:06 -08:00
Ryan Barrett ccdb77d743
common.create_task: connect trace by adding traceparent header
https://cloud.google.com/trace/docs/trace-context#http-requests
https://stackoverflow.com/a/71343735/186123
2024-12-02 18:22:36 -08:00
Ryan Barrett 676dae3fd9
test_atproto: noop: switch some store_object calls to Objects in memory 2024-11-29 22:06:51 -08:00
Ryan Barrett f57951d5d8
require web users to have an Atom or RSS feed or webmentions
for #1458
2024-11-24 21:03:51 -08:00
Ryan Barrett b4ac98c84e
move common.add, remove to webutil.util
in snarfed/webutil@46ef97e4fe
2024-10-31 09:41:28 -07:00
Ryan Barrett 2cd127bb5a
/update-profile: for Web users, try to set ATProto handle to domain
for #826
2024-10-28 21:23:11 -07:00
Ryan Barrett 4abb52b1d1
add username DM command, new Protocol.set_username method, implement in ATProto
for #826
2024-10-27 10:50:27 -07:00
Ryan Barrett 059c7ed46a
User.enable_protocol: always call Protocol.create_for
...even if there's already a copy, since it might need to be reactivated

for #1130
2024-10-22 14:30:49 -07:00
Ryan Barrett bba9cb2d16
send and send task: switch orig_obj param from urlsafe-key to string id
...so that we can defer loading it to each protocol's send(). only ActivityPub actually needs it right now. should get rid of it eventually! see #1257
2024-10-11 11:34:31 -07:00
Ryan Barrett a5cbc9b581
tests: remove routing special case for Fake and OtherFake in Protocol.receive
for #1180
2024-10-08 15:03:43 -07:00
Ryan Barrett 5b75fa43d5
noop: tests: rename ExplicitEnableFake => ExplicitFake, eefake => efake 2024-10-08 15:03:43 -07:00
Ryan Barrett 6c7ec88d4c
start checking fake sent objects in tests, test_dms first
for #1076
2024-10-08 15:03:42 -07:00
Ryan Barrett 4255719939
activitypub.actor: put native user id in alsoKnownAs
for https://github.com/snarfed/bridgy-fed/issues/1331
2024-10-02 15:01:07 -07:00
Ryan Barrett 788b37279a
pass Object data in receive task HTTP payload instead of through datastore
trying to cut down datastore load and costs. this switches receive tasks from storing and fetching Objects from the datastore to passing their properties - notably as2, our_as1, bsky, etc - in the HTTP request body, as serialized JSON inside form-encoded params.

for #1354, #1149
2024-10-01 21:44:12 -07:00
Ryan Barrett 5330dca6e2
refactor models.get_original* queries to cache more and query less
for #1149
2024-09-19 20:58:34 -07:00
Ryan Barrett 794a772619
switch ATProto chat polling from task to cron job 2024-09-10 16:46:37 -07:00
Ryan Barrett 36a9f94cb8
add fallback kwargs to User.user_link, Protocol.bridged_web_url_for
for #966
2024-09-10 16:44:18 -07:00
Ryan Barrett 60c92e1465
upgrade App Engine app runtime to python 3.12
https://cloud.google.com/appengine/docs/standard/reference/app-yaml?tab=python#runtime

https://cloud.google.com/appengine/docs/flexible/python/runtime#recommended_gunicorn_configuration
2024-09-09 21:58:52 -07:00
Ryan Barrett a896b5c869
Protocol.check_supported: allow DMs to/from protocol bot user copy ids
for #966
2024-08-29 12:56:07 -07:00
Ryan Barrett 9c0ad8c00c
ATProto: poll for new chat messages to protocol bot users
for #966
2024-08-27 22:44:37 -07:00
Ryan Barrett 6675d9805c
User.user_link: add name, handle, pictures, proto kwargs, remove maybe_internal_link 2024-08-21 07:55:09 -07:00
Ryan Barrett 004d3617f8
dms.receive: first pass at DM handle to request bridging
for #966
2024-08-19 13:26:45 -07:00
Ryan Barrett 69a158aee5
suppress bs4 DeprecationWarning, 'strip_cdata' option of HTMLParser
local/lib/python3.11/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.

introduced in lxml 5.3.0, d31d21396c
2024-08-12 13:51:50 -07:00
Ryan Barrett 497136f1fc
cache Protocol.for_handle 2024-08-12 13:39:11 -07:00
Ryan Barrett eebea504b6
Protocol.bot_dm: handle when recipient has no profile obj
fixes https://console.cloud.google.com/errors/detail/CIGR6crBlMKMBg;locations=global;time=P30D?project=bridgy-federated
2024-08-11 08:41:44 -07:00
Ryan Barrett 925771562f
add Protocol.SUPPORTS_DMS
for #1024, #966, etc
2024-08-08 20:41:57 -07:00
Ryan Barrett cd0a4bce9e
AP: add outbound DM support
for #1024, #966, etc
2024-08-08 20:35:56 -07:00
Ryan Barrett c8d6ba510f
add ATProto.send_chat
for #1024, #966, #758, etc
2024-08-07 13:09:37 -07:00
Ryan Barrett 479acea657
move Web.verify from /web-site handler to Web.get_or_create
for #1232
2024-08-06 11:07:13 -07:00
Ryan Barrett 5679d696a4
cache models.get_originals in memory
for #1149
2024-08-01 16:20:13 -07:00
Ryan Barrett e9dc38c75c
actually turn on ndb global cache with global_cache_policy
🤦
2024-08-01 12:42:13 -07:00
Ryan Barrett 4097fe71fb
use ndb in-memory context cache for DID doc Objects
for #1149
2024-08-01 12:09:37 -07:00
Ryan Barrett 37e70104e5
drop unused protocol.seen_ids, we switched it to memcache a bit ago 2024-07-24 14:58:25 -07:00