Problem A message sent from XWiki to a fediverse account (e.g. a Mastodon user) does not notify the recipient. Mastodon stores it with a limited visibility and a silent mention, so it only shows up in the home timeline of a recipient who already follows the sender, and nowhere at all otherwise. Cause ActivityPubScriptServiceActor#fillRecipients only adds the targeted actors to the to property of the sent object, which never carries a tag:
{
"type": "Note",
"attributedTo": [ "https: ],
"content": "Hello",
"to": [ "https: ]
}
ActivityPub receivers distinguish the audience (to / cc: who may see the object) from the mentions (the tag entries of type Mention: who is addressed). Mastodon creates a silent mention for an account found only in the audience, and raises notifications for non-silent mentions only. Suggested fix Also add a Mention to tag for each explicitly targeted actor, with the actor id as href and the @user@domain handle as name, like ActivityPubMentionsSender already does. followers and public are audiences, not mentions, and must not be tagged. Reproduced with Mastodon 4.6.3. |