Skip to content

fix(activitypub): deliver outgoing notes to followers (getFollowerSharedInboxes wrong column)#702

Merged
NuSkooler merged 1 commit into
NuSkooler:masterfrom
Panxatony:fix/ap-follower-sharedinbox-query
Jun 18, 2026
Merged

fix(activitypub): deliver outgoing notes to followers (getFollowerSharedInboxes wrong column)#702
NuSkooler merged 1 commit into
NuSkooler:masterfrom
Panxatony:fix/ap-follower-sharedinbox-query

Conversation

@Panxatony

Copy link
Copy Markdown
Contributor

What

getFollowerSharedInboxes() in core/activitypub/collection.js filtered the followers rows with WHERE f.name = ? bound to the followers endpoint URL. In the collection table, name holds the collection type ('followers') while the endpoint URL lives in collection_id (per the schema comments and every other query in the file). So the JOIN matched zero rows → no shared inboxes collected → outgoing public notes were written to the outbox but never delivered to followers. The tosser still logged "Note Activity published successfully", masking the failure.

Fix

- WHERE f.name = ?
+ WHERE f.collection_id = ? AND f.name = ?
  ...
- .all(ActorCollectionId, Collections.Actors, followersEndpoint);
+ .all(ActorCollectionId, Collections.Actors, followersEndpoint, Collections.Followers);

Verification

Confirmed at the SQL level on a live install: the original WHERE f.name = <url> returns 0 rows; the corrected WHERE f.collection_id = <url> AND f.name = 'followers' returns the follower's endpoints.sharedInbox. After the patch, posting a public note logs "Message delivered to Inbox" inbox=https://<remote>/inbox and the note appears in the follower's Mastodon timeline.

Likely a regression from the SQL refactor that replaced the previous per-actor Actor.fromId() fan-out loop.

Fixes #701

…redInboxes)

Public notes were persisted to the outbox but never delivered: the
followers->actors JOIN filtered `WHERE f.name = ?` bound to the followers
*endpoint URL*, but in the `collection` table `name` holds the collection
type ('followers') and the URL lives in `collection_id`. The filter matched
zero rows, so no shared-inboxes were collected and nothing was sent (while
the tosser still logged "published successfully").

Filter on `collection_id` (the endpoint URL) and `name` ('followers'),
consistent with the other queries in this file.

Fixes NuSkooler#701

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@NuSkooler NuSkooler left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this!

@NuSkooler NuSkooler merged commit c88b7e4 into NuSkooler:master Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ActivityPub: outgoing public posts never delivered to followers — getFollowerSharedInboxes() queries wrong column

2 participants