Town: Pleroma joins, and a rerun finds what it made
Pleroma 2.10.2 runs in the pasture from its OTP release (libvips, the dedupe question, and hackney pointed at the system CA bundle); its driver is Akkoma's on its own container and database. The pair passes 241 cells, after its first run showed Pleroma dropping Follows it could not verify yet. The PrivaPub driver finds the group an earlier run made instead of failing on the name; the seeder posts a quote or reply of a post from its own round after that post. 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
5b3e456e09
commit
73c362de96
12 files changed
+141
-7
No files matched your search
@@ -6,6 +6,7 @@ from dialects.iceshrimp import Iceshrimp
|
||||
from dialects.lemmy_api import LemmyApi
|
||||
from dialects.mastodon import Mastodon
|
||||
from dialects.misskey_api import Misskey, Sharkey
|
||||
from dialects.pleroma import Pleroma
|
||||
from dialects.privapub import PrivaPub
|
||||
|
||||
DRIVERS = {
|
||||
@@ -18,6 +19,7 @@ DRIVERS = {
|
||||
"lemmy": (LemmyApi, "lemmy.test"),
|
||||
"hollo": (Hollo, "hollo.test"),
|
||||
"iceshrimp": (Iceshrimp, "iceshrimp.test"),
|
||||
"pleroma": (Pleroma, "pleroma.test"),
|
||||
}
|
||||
|
||||
_made = {}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
"""Pleroma 2.10: Akkoma's parent, driven exactly as Akkoma (pleroma_ctl, the password grant, its Postgres) from its own
|
||||
container and database. What differs on the wire (the inbox's 400 to Move, QuoteRequest and Bite; quotes rewritten to
|
||||
"RT:" by InlineQuotePolicy) is the checker's business, not the driver's."""
|
||||
from dialects.akkoma import Akkoma
|
||||
|
||||
|
||||
class Pleroma(Akkoma):
|
||||
platform = "pleroma"
|
||||
container = "pasture-pleroma"
|
||||
ctl = "/opt/pleroma/bin/pleroma_ctl"
|
||||
db = "pleroma"
|
||||
@@ -69,11 +69,19 @@ class PrivaPub(MastodonApi):
|
||||
# -- groups: communities (FEP-1b12) and circles
|
||||
def group(self, s, username, name, community, policy="followers", approve=False):
|
||||
jwt = self.jwt(s.account.root, s.account.password)
|
||||
r = self.http.post(self.base + "/clientapi/group/insert", headers={"Authorization": f"Bearer {jwt}"}, ok={200, 201},
|
||||
auth = {"Authorization": f"Bearer {jwt}"}
|
||||
r = self.http.post(self.base + "/clientapi/group/insert", headers=auth,
|
||||
json={"avatarId": s.local_id, "userName": username, "name": name, "description": name,
|
||||
"isCommunity": community, "postingPolicy": policy, "isDiscoverable": community,
|
||||
"manuallyApprovesMembers": approve})
|
||||
return r.json()
|
||||
if r.ok:
|
||||
return r.json()
|
||||
# a run on accounts an earlier run made finds the group it made
|
||||
mine = self.http.get(self.base + "/clientapi/group/list", headers=auth, params={"avatarId": s.local_id}, ok={200}).json() or []
|
||||
found = next((g for g in mine if g.get("userName") == username), None)
|
||||
if found is None:
|
||||
raise RuntimeError(f"/clientapi/group/insert answered {r.status}: {r.text[:300]}")
|
||||
return found
|
||||
|
||||
# -- content
|
||||
def post(self, s, spec):
|
||||
|
||||
Reference in new issue
Block a user