From 06d694eff2040ff2b6a05cf13d6f6eefefae7f02 Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 21 Feb 2026 22:43:33 +0000 Subject: [PATCH] Fix AP Accept: add activity id + upsert followers - Accept activity now includes required 'id' field (uuid-based) - Updated shared submodule: add_follower upserts to prevent IntegrityError Co-Authored-By: Claude Opus 4.6 --- bp/actors/routes.py | 3 +++ shared | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bp/actors/routes.py b/bp/actors/routes.py index 49c0745..060f867 100644 --- a/bp/actors/routes.py +++ b/bp/actors/routes.py @@ -7,6 +7,7 @@ from __future__ import annotations import json import logging import os +import uuid import httpx from quart import Blueprint, request, abort, Response, g, render_template @@ -52,8 +53,10 @@ async def _send_accept( username = actor.preferred_username actor_url = f"https://{domain}/users/{username}" + accept_id = f"{actor_url}/activities/{uuid.uuid4()}" accept = { "@context": "https://www.w3.org/ns/activitystreams", + "id": accept_id, "type": "Accept", "actor": actor_url, "object": follow_activity, diff --git a/shared b/shared index 24432cd..1d83a33 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit 24432cd52acae183416d8e198206923bddb815b8 +Subproject commit 1d83a339b6008b1743846ea5ab32fe15abe644a9