Ryan Barrett
c641c5ef1f
ActivityPub.send: skip if no from_user
...
fixes https://console.cloud.google.com/errors/detail/CJ-QrsHmi8qr6AE;locations=global;time=P30D?project=bridgy-federated
2024-09-13 22:26:33 -07:00
Ryan Barrett
f3522e42bc
Protocol.translate_ids: translate to, cc, bto, bcc
...
for #12
2024-09-13 14:50:43 -07:00
Ryan Barrett
cfaacb8ff5
stop unwrapping ids etc in ActivityPub.inbox, do it in Object.as1 instead
...
for #12
2024-09-13 13:09:22 -07:00
Ryan Barrett
3dc3330603
code doc and docstring tweaks
2024-09-12 13:05:41 -07:00
Ryan Barrett
e2b6b59ff4
activitypub.postprocess_as2: for Create/Update, put object's to/cc into activity
...
for possible Pleroma/Akkoma interop:
https://git.pleroma.social/pleroma/pleroma/-/issues/3206#note_108296
https://indieweb.social/@diego@lounge.collabfc.com/112977955332152430
2024-08-21 11:39:06 -07:00
Ryan Barrett
e776ff944b
move not-public check from activitypub.inbox to Protocol.receive
2024-08-19 12:02:52 -07:00
Ryan Barrett
d7642e0392
AP DMs: wrap in post activity, add mention tag, improve DM vs public handling
2024-08-17 16:48:55 -07:00
Ryan Barrett
34cb4fbe59
AP: fix followers and outbox for protocol bot users
...
eg https://bsky.brid.gy/bsky.brid.gy/followers , wasn't working before
2024-08-17 12:01:58 -07:00
Ryan Barrett
4c12c087ac
AP outbox: turn off querying too
...
for #1248
2024-08-14 08:32:02 -07:00
Ryan Barrett
775756c7b2
temporarily disable outboxes
...
for #1248
2024-08-13 21:22:00 -07:00
Ryan Barrett
b3272e84c9
activitypub.postprocess_as2: handle multiply-valued inReplyTo
...
for #1257
2024-08-13 17:48:50 -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
a96209a333
AP inbox: check that activity is public before verifying signature
2024-08-07 13:09:37 -07:00
Ryan Barrett
978f1f7019
noop: activitypub: existing server actor test, ignore 'ap' protocol label
2024-08-05 19:20:57 -07:00
Ryan Barrett
29482d1c66
AP: automatically bridge server/instance actors
...
for #1184
2024-08-05 13:34:55 -07:00
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
96846c2f2a
protocol, activitypub: drop some verbose logging from INFO down to DEBUG
2024-07-25 14:44:15 -07:00
Ryan Barrett
7e792ea22f
drop spam filter req't that display name is different than username
...
for https://akkoma.dev/AkkomaGang/akkoma/issues/438#issuecomment-12745 , cc @snan
2024-07-16 10:46:17 -07:00
Ryan Barrett
1f73058ef6
Protocol.receive, ActivityPub.inbox: consolidate memcache key for seen activities
2024-07-12 08:21:30 -07:00
Ryan Barrett
7b0151b0cf
memcache: truncate keys at 250 chars
...
max memcache key len:
https://github.com/memcached/memcached/wiki/Commands#standard-protocol
https://pymemcache.readthedocs.io/en/latest/apidoc/pymemcache.client.base.html
fixes https://console.cloud.google.com/errors/detail/CNPzqYzWg4_TyQE;time=P30D?project=bridgy-federated
2024-07-12 07:50:54 -07:00
Ryan Barrett
08b41b0ede
test Protocol.targets for undo block, special case in activitypub.postprocess_as2
...
for #1162
2024-07-06 19:36:11 -07:00
Ryan Barrett
df75e97880
atproto_firehose.handle bug fix: deletes don't have records
...
for #1162
2024-07-06 14:47:14 -07:00
Ryan Barrett
e5a6ebf228
drop Protocol.HAS_FOLLOW_ACCEPTS in favor of SUPPORTED_AS1_TYPES
2024-07-05 23:12:35 -07:00
Ryan Barrett
2d1cb80e80
Protocol.check_supported bug fix: handle undo of activity
2024-07-05 12:26:59 -07:00
Ryan Barrett
08591a11db
ActivityPub.inbox: don't report error on unsupported type, just log
2024-07-04 22:28:41 -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
25199f8c9a
activitypub.inbox: only mark id seen in memcache after we've enqueued the receive task
...
for https://github.com/snarfed/bridgy-fed/issues/1047#issuecomment-2195287066
2024-06-27 13:20:07 -07:00
Ryan Barrett
85d85d1ffd
AP: harden outbox and followers/ing collections to only count up to a limit
...
we should eventually precompute them so we can always return them cheaply!
for #1152
2024-06-26 10:56:27 -07:00
Ryan Barrett
fc0cc1118a
activitypub.inbox: short circuit on activity or actor id on opted out domain
2024-06-23 09:20:22 -07:00
Ryan Barrett
bf657d3409
ActivityPub.inbox: return 400 on invalid activity id
...
fixes https://console.cloud.google.com/errors/detail/CLSnttKfy4v90wE;time=P7D?project=bridgy-federated
2024-06-20 14:32:37 -07:00
Ryan Barrett
32c69876fb
AP: bug fix for converting Link attachments to HTML links in content
...
for 980a786
, #958
2024-06-19 13:54:06 -07:00
Ryan Barrett
980a786c6b
AP: convert Link attachments to HTML links in content
...
...since some fediverse platforms (notably Mastodon) will render them as blank "Preview not available" embeds, and support on other platforms is unreliable. Most reliably generate preview embeds for HTML links in content though.
fixes #958
2024-06-19 13:29:20 -07:00
Ryan Barrett
49445c9f97
AP outbox and following endpoints: 404 if user hasn't enabled AP
2024-06-14 12:00:20 -07:00
Ryan Barrett
f21bc2cfe8
ActivityPub.target_for: pass shared kwarg through to recursive call
2024-06-13 20:11:37 -07:00
Ryan Barrett
4e489a4ee0
activitypub.inbox: store seen activity ids in memcache, short circuit on seen ids earlier
2024-06-13 13:54:37 -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
cc564a2b19
turn on authorization checks! HTTP sig matches actor, actor is allowed to modify object
...
for #566
2024-06-03 14:12:08 -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
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
7e594e3227
authz: move NO_AUTH_DOMAINS (a.gup.pe) from Protocol.receive to activitypub.inbox
...
for #566
2024-05-30 13:34:14 -07:00
Ryan Barrett
fda7a79437
authz: on delete of actor signed by actor, pass authed_as to Object.get_or_create
...
for #566
2024-05-30 11:39:07 -07:00
Ryan Barrett
9f33767f33
authz: move LD Sig check from Protocol.receive to activitypub.inbox
...
for #566
2024-05-29 21:17:38 -07:00
Ryan Barrett
8f5d8221a9
add ids.profile_id, use everywhere
...
for #566
2024-05-29 16:18:15 -07:00