Uploaded image for project: 'ActivityPub Application'
  1. ActivityPub Application
  2. XAP-116

Messages sent to a fediverse account do not notify the recipient: the recipient is not mentioned in the tag property

    XMLWordPrintable

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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: