Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.2
-
None
-
Unknown
-
Description
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://xwiki.example/activitypub/Person/xwiki%253AXWiki.bob" ],
"content": "Hello",
"to": [ "https://mastodon.example/users/alice" ]
}
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.