Pasture: Friendica joins, in the scenarios and the town
Friendica 2026.05 on the shared MySQL and Redis, with its worker daemon as a sidecar. friendica_settle repairs what its install leaves: the system user has no name, so the system account that signs its fetches is never made; the web container cannot see the sidecar's daemon, so a queued job waits for the five-minute cron unless the daemon is declared running; its log needs a file and debugging on. Accounts are saved through its API with locked=0 (a number: "true" reads as 0, unlocked), which makes them soapbox pages that take followers without following back, and each one's outbox is read once: a Follow that reaches an account Friendica has not cached makes it fetch the account from itself, signed, and checking that signature recursed for five minutes, holding PrivaPub's first follow past its timeout. scenarios/friendica.sh passes its 25 checks from a clean install: follows and unfollows, posts (a titled one with its title), comments, likes, Friendica's dislike as a downvote, boosts, edits (through its web editor: its Mastodon API never federates one) and deletes, both ways. The town gets a Friendica driver (HTTP Basic, its MySQL read through mysql_json, edits in the web editor, no bookmark on a reply) and specs/friendica-pair.json, which passes its 275 checks. On the way: - the checker knows Friendica's thread model: a non-public reply reaches an account only under posts it holds, and a Friendica account's non-public reply in a thread another server owns reaches nobody else there; - the seeder answers a follow request the target still holds whatever the follower's server says: Friendica reports a follow of someone already following its account as made at once (and shows that persona's followers-only posts while a locked persona still holds the request); - the selftest skips polls where a platform has none; the shared MySQL helpers move to peers/shared.sh. 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
e485f7bd47
commit
a5d493a8c9
17 files changed
+513
-31
No files matched your search
@@ -31,6 +31,11 @@ DROPS_ORPHAN_REPLIES = {"misskey", "sharkey"}
|
||||
# Pixelfed is a photo platform: it keeps a post only when it carries a picture (a Note without one is dropped as it
|
||||
# arrives), and a reply only to a post it holds
|
||||
NEEDS_PICTURE = {"pixelfed"}
|
||||
# Friendica shows a reply to an account only inside a thread that account holds, under a parent it holds, and counts on
|
||||
# the thread's owner to relay the replies in it: a non-public reply never reaches an account that cannot see one of the
|
||||
# posts above it, and a Friendica account's non-public reply in a thread another server owns reaches none of the
|
||||
# others there (nobody relays a followers-only reply), nor anything under it
|
||||
THREAD_BOUND = {"friendica"}
|
||||
|
||||
|
||||
class World:
|
||||
@@ -332,7 +337,7 @@ class Sweep:
|
||||
if not row or not row.exists or row.deleted:
|
||||
continue
|
||||
here = [k for k in self.w.planner.accounts if self.w.platform(k) == p and k != o["author"]]
|
||||
inside = sorted(k for k in here if k in recipients)[:2]
|
||||
inside = sorted(k for k in here if k in recipients and self.in_thread(p, o, k))[:2]
|
||||
outside = sorted(k for k in here if k not in recipients)[:2]
|
||||
for k in inside:
|
||||
by_platform[p].append((ref, o, k, True))
|
||||
@@ -351,6 +356,19 @@ class Sweep:
|
||||
feature = f"{'see' if should else 'hide'}.{o['visibility']}"
|
||||
self.add(feature, o["origin"], p, seen is should, ref, should, seen, how=k)
|
||||
|
||||
def in_thread(self, p, o, k):
|
||||
"""Whether a reply can reach account k on platform p, where a platform shows replies only in threads (THREAD_BOUND)."""
|
||||
if p not in THREAD_BOUND or not o.get("parent"):
|
||||
return True
|
||||
chain, node = [], o
|
||||
while node is not None:
|
||||
chain.append(node)
|
||||
node = self.w.objects.get(node.get("parent") or "")
|
||||
root, shown = chain[-1], ("public", "unlisted", "community")
|
||||
if any(a["visibility"] not in shown and k != a["author"] and k not in self.w.recipients(a) for a in chain[1:]):
|
||||
return False
|
||||
return not any(a["origin"] == p and root["origin"] != p and a["visibility"] not in shown and k != a["author"] for a in chain[:-1])
|
||||
|
||||
# -- the graph as each side reports it
|
||||
def graph(self):
|
||||
sessions = {f"{s.account.platform}/{s.account.username}": s for s in state.sessions()}
|
||||
|
||||
Reference in new issue
Block a user