Following an account brings its earlier posts to its profile
Once a follow holds, OutboxBackfill reads the account's latest public posts from its outbox's first page (twenty at most, once a day) and keeps them as any fetched post: its profile shows them at once instead of only what it posts from then on. Homes still get only what arrives afterwards, as on Mastodon. Announces and other servers' objects in the outbox are left out. Checked live against Mastodon (scenarios/pins.sh, now 9 checks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
b218768904
commit
b45321f28d
11 files changed
+203
-10
No files matched your search
@@ -1,6 +1,7 @@
|
||||
# Pinned posts across servers (featured, FEP-e232's Add and Remove): a Mastodon account pins and unpins while alice
|
||||
# follows it; alice pins and unpins while it follows her; an account that pinned before PrivaPub ever saw it shows its
|
||||
# pins once resolved (its featured collection, read with its counts). Needs the mastodon peer.
|
||||
# pins once resolved (its featured collection, read with its counts), and following it brings its earlier posts (its
|
||||
# outbox). Needs the mastodon peer.
|
||||
M=https://mastodon.test:6443
|
||||
mcurl() { curl -sk --resolve mastodon.test:6443:127.0.0.1 "$@"; }
|
||||
. "$here/peers/mastodon.sh"
|
||||
@@ -52,3 +53,10 @@ mcurl -o /dev/null -X POST -H "Authorization: Bearer $ET" "$M/api/v1/statuses/$(
|
||||
early_on_p=$(curl -s -H "$PH" "$P/api/v2/search?q=$early@mastodon.test&resolve=true&type=accounts" | j "print(d['accounts'][0]['id'])")
|
||||
until_true 45 '[ "$(p_pinned $early_on_p)" = "$(echo "$e_post" | j "print(d[\"uri\"])")" ]' \
|
||||
&& ok "an account's earlier pin shows once it is resolved" || ko "the earlier pin never showed ($(p_pinned $early_on_p))"
|
||||
|
||||
echo " posts made before"
|
||||
# alice follows the fresh account: its outbox's latest public posts come to its profile here (OutboxBackfill)
|
||||
e_other=$(mcurl -X POST -H "Authorization: Bearer $ET" "$M/api/v1/statuses" -d "status=written before anyone followed $run&visibility=public" | j "print(d['uri'])")
|
||||
curl -s -o /dev/null -X POST -H "$PH" "$P/api/v1/accounts/$early_on_p/follow"
|
||||
until_true 60 '[ "$(curl -s -H "$PH" "$P/api/v1/accounts/$early_on_p/statuses?limit=40" | j "print(any(s[\"uri\"] == \"$e_other\" for s in d))")" = "True" ]' \
|
||||
&& ok "following an account brings its earlier posts to its profile" || ko "the account's earlier posts never came"
|
||||
Reference in new issue
Block a user