Fix AP Accept: add activity id + upsert followers
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ from __future__ import annotations
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import uuid
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from quart import Blueprint, request, abort, Response, g, render_template
|
from quart import Blueprint, request, abort, Response, g, render_template
|
||||||
@@ -52,8 +53,10 @@ async def _send_accept(
|
|||||||
username = actor.preferred_username
|
username = actor.preferred_username
|
||||||
actor_url = f"https://{domain}/users/{username}"
|
actor_url = f"https://{domain}/users/{username}"
|
||||||
|
|
||||||
|
accept_id = f"{actor_url}/activities/{uuid.uuid4()}"
|
||||||
accept = {
|
accept = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
"id": accept_id,
|
||||||
"type": "Accept",
|
"type": "Accept",
|
||||||
"actor": actor_url,
|
"actor": actor_url,
|
||||||
"object": follow_activity,
|
"object": follow_activity,
|
||||||
|
|||||||
2
shared
2
shared
Submodule shared updated: 24432cd52a...1d83a339b6
Reference in New Issue
Block a user