A post named by its page is found as by its id
Pixelfed names one of our posts by the address of its page (/@name/<post id>, the post's url) in its Like, Announce and their Undo, so its likes were dropped as unknown objects. Before an activity is handled, such a reference to a post of ours, as its object or the object of the activity it undoes, is replaced by the post's id. Found by the pasture's new Pixelfed peer. 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
34c0f696af
commit
26dac40720
4 files changed
+72
-2
No files matched your search
@@ -26,10 +26,12 @@ namespace PrivaPub.Federation.Inbox
|
||||
readonly IReadOnlyDictionary<string, IActivityHandler> _handlers;
|
||||
readonly ILogger<InboxProcessor> _logger;
|
||||
readonly IInteractionLedger _ledger;
|
||||
readonly ILocalActorService _localActors;
|
||||
|
||||
public InboxProcessor(IRemoteActorService remoteActors, IEnumerable<IActivityHandler> handlers, ILogger<InboxProcessor> logger,
|
||||
IInteractionLedger ledger = default)
|
||||
IInteractionLedger ledger = default, ILocalActorService localActors = default)
|
||||
{
|
||||
_localActors = localActors;
|
||||
_remoteActors = remoteActors;
|
||||
_handlers = handlers.ToDictionary(h => h.Type, StringComparer.Ordinal);
|
||||
_logger = logger;
|
||||
@@ -65,6 +67,7 @@ namespace PrivaPub.Federation.Inbox
|
||||
Arrival.Current = arrival;
|
||||
try
|
||||
{
|
||||
await LocalReferences.Canonicalise(activity, _localActors?.BaseAddress, token);
|
||||
await handler.Handle(activity, actor, token);
|
||||
}
|
||||
catch (Exception ex) when (ex is not OperationCanceledException)
|
||||
|
||||
Reference in new issue
Block a user