Release Notes for ActivityPub Application 1.2

Last modified by Manuel Leduc on 2020/04/30

This is the release notes for ActivityPub Application 1.2.
This release brings some new features such as the capabilities to follow an entire Wiki, to see directly on your wiki the content of external pages you have been notified about, or to share documents. Besides that, it improves a lot the work already done in previous releases to stabilize and to help using ActivityPub: an user picker to chose a fediverse user to interact with in the UI, the display of sent and receive messages, a reshape of the notifications etc.

Please pay attention that this release is not backward compatible with previous versions of ActivityPub: we performed important internal changes to help migrating data on future versions. See more details in the backward compatibility section.

New and Noteworthy (since ActivityPub Application 1.1)

Full list of issues fixed and Dashboard for 1.2.

For Users

Document content is now sent to activitypub actors

 
In ActivityPub 1.1, document sharing was realized by sending a message containing a link to the document to receiver of the share.

In ActivityPub 1.2, document sharing is now realized by sending an html export of the page to the receiver. That way, document can be consulted remotely even without the need to send a request to the sender.

On the receiver side, the notifications of messages contains a button to display a modal windows presenting the content of the shared document.

See messages sent and received

 
Two new tabs are available in the ActivityPub Dashboard to allow you to see the messages you sent and received.

ActivityPub User Picker

 
It is now possible to find users who already interacted with the current instance by starting typing their name, when an identifier is needed (for following or messaging for example).

Sharing of documents

 
It is now possible to explicitely share any document of a Wiki (viewable by guest user) to a fediverse member.

For sharing a document, go to any wiki page and click on the share button at the top right of the page (see the gallery below). You will be asked to enter the targeted users, but you can also choose your followers.

Allow to follow an entire Wiki

 
It is now possible to follow not only XWiki Users, but also an entire Wiki as any other actor. Following a Wiki will allow to receive ActivityPub events for any document created or updated on that wiki. It is also possible for the people who administrate the Wiki to use it as an ActivityPub actor to send messages or follow other people.

To follow a Wiki just go to the ActivityPub Dashboard as a guest user, and you will get the identifier to use for following that wiki. To manage the Wiki actor, if you are entitled to do so, once you are logged-in on your Wiki you should be able to switch roles in the ActivityPub dashboard.

Some options are available in the Administration for managing the Wiki actor: you can chose which XWiki Group is entitled to manage the ActivityPub Wiki Actor. By default, the Admin group is selected, but you can use any group. Any people belonging to that group will be able to perform actions on behalf of the Wiki on ActivityPub, such as receiving the notifications for the Wiki, following people/other Wiki, send messages etc.

Miscellaneous

  • Notifications are sent asynchronously: On ActivityPub 1.1, page creation notifications where sent synchronously. Consequently, page saving could be very slow in case of high server load or in case of network congestion.

    On ActivityPub 1.2, page creation or modification notifications are done asynchronously. Consequently, the emission of notifications in transparent from the point of view of documents editors.

  • Update of the preferred username of actors: In order to improve the compatibility of xwiki with external actors of the fediverse (e.g., mastodon), we changed the naming scheme of the actors preferred username.

    It is now the same as the left part of the actor's webfinger id.

  • Filter private information before serving them: Starting with this release all information that are not explicitely targeting "Public" will be discarded if another ActivityPub Service tries to access the users' information.

For Admins

Send ActivityPub events in case of documents created/updated

 
By default, Created and edited documents (only on major changes) that can be publicly read by anonymous users are automatically shared to the Author's followers and to the followers of the wiki in which the page is created or edited.

This feature can be either entirely disabled in the Administration, or an Admin can decide to only send ActivityPub Events to the whole wiki followers.

For Developers

No changes!

Translations

The following translations have been updated: 

Known issues

Backward Compatibility and Migration Notes

ActivityPub 1.2 is not backward compatible with ActivityPub 1.1 and we do not provide a way to migrate the data from previous version.

If you already have an installed version of ActivityPub, please pay attention to properly uninstall it, and delete the ActivityPub Solr Core (located under XWiki permanent directory on a directory named "activitypub") before proceeding to install ActivityPub 1.2.

API Breakages

The following APIs were modified since ActivityPub 1.1:

  • Return type of the follow operation changed to allow more accurate information to be returned.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method boolean org.xwiki.contrib.activitypub.script.ActivityPubScriptService::follow(org.xwiki.contrib.activitypub.entities.AbstractActor)

      ## New:
      method org.xwiki.contrib.activitypub.script.FollowResult org.xwiki.contrib.activitypub.script.ActivityPubScriptService::follow(org.xwiki.contrib.activitypub.entities.AbstractActor)
  • Change unstable API for storage to comply with new usecases.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter <T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject> T org.xwiki.contrib.activitypub.ActivityPubStorage::retrieveEntity(===java.lang.String===) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      parameter <T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject> T org.xwiki.contrib.activitypub.ActivityPubStorage::retrieveEntity(===java.net.URI===) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Change unstable API for storage to comply with new usecases.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method java.lang.String org.xwiki.contrib.activitypub.ActivityPubStorage::storeEntity(org.xwiki.contrib.activitypub.entities.ActivityPubObject) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      method java.net.URI org.xwiki.contrib.activitypub.ActivityPubStorage::storeEntity(org.xwiki.contrib.activitypub.entities.ActivityPubObject) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Change unstable API for storage to comply with new usecases.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method boolean org.xwiki.contrib.activitypub.ActivityPubStorage::storeEntity(java.lang.String, org.xwiki.contrib.activitypub.entities.ActivityPubObject) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Change unstable API for storage to comply with new usecases.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method java.lang.String org.xwiki.contrib.activitypub.ActivityPubStorage::storeEntity(java.net.URI, org.xwiki.contrib.activitypub.entities.ActivityPubObject) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Unstable API: not breaking. Use a more sound type for AP.
    • Violation type:
      java.method.parameterTypeParameterChanged
    • Code:
      ## Old:
      parameter <T extends org.xwiki.contrib.activitypub.entities.AbstractActivity> void org.xwiki.contrib.activitypub.ActivityPubNotifier::notify(T, ===java.util.Set<org.xwiki.user.UserReference>===) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      parameter <T extends org.xwiki.contrib.activitypub.entities.AbstractActivity> void org.xwiki.contrib.activitypub.ActivityPubNotifier::notify(T, ===java.util.Set<org.xwiki.contrib.activitypub.entities.AbstractActor>===) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Unstable API: not breaking. The signature should be made for an Actor.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter void org.xwiki.contrib.activitypub.SignatureService::generateSignature(org.apache.commons.httpclient.HttpMethod, java.net.URI, java.net.URI, ===org.xwiki.user.UserReference===) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      parameter void org.xwiki.contrib.activitypub.SignatureService::generateSignature(org.apache.commons.httpclient.HttpMethod, java.net.URI, java.net.URI, ===org.xwiki.contrib.activitypub.entities.AbstractActor===) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Unstable API: not breaking. The signature should be made for an Actor.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter java.lang.String org.xwiki.contrib.activitypub.SignatureService::getPublicKeyPEM(===org.xwiki.user.UserReference===) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      parameter java.lang.String org.xwiki.contrib.activitypub.SignatureService::getPublicKeyPEM(===org.xwiki.contrib.activitypub.entities.AbstractActor===) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Unstable API: not breaking. The current user is necessarily a Person.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter boolean org.xwiki.contrib.activitypub.script.ActivityPubScriptService::isCurrentUser(===org.xwiki.contrib.activitypub.entities.AbstractActor===)

      ## New:
      parameter boolean org.xwiki.contrib.activitypub.script.ActivityPubScriptService::isCurrentUser(===org.xwiki.contrib.activitypub.entities.Person===)
  • Unstable API: not breaking. Simplify API for SignatureService.
    • Violation type:
      java.method.numberOfParametersChanged
    • Code:
      ## Old:
      method void org.xwiki.contrib.activitypub.SignatureService::generateSignature(org.apache.commons.httpclient.HttpMethod, java.net.URI, java.net.URI, org.xwiki.user.UserReference) throws org.xwiki.contrib.activitypub.ActivityPubException

      ## New:
      method void org.xwiki.contrib.activitypub.SignatureService::generateSignature(org.apache.commons.httpclient.HttpMethod, org.xwiki.contrib.activitypub.entities.AbstractActor) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Not breaking: class has not been removed but moved to activitypub-core.
    • Violation type:
      java.class.removed
    • Code:
      ## Old:
      interface org.xwiki.contrib.activitypub.ActivityPubConfiguration
  • Not breaking: class has not been removed but moved to activitypub-core.
    • Violation type:
      java.class.removed
    • Code:
      ## Old:
      interface org.xwiki.contrib.activitypub.ActorHandler
  • Not breaking: Unstable API.
    • Violation type:
      java.method.returnTypeTypeParametersChanged
    • Code:
      ## Old:
      method java.util.List<java.lang.String> org.xwiki.contrib.activitypub.webfinger.entities.JSONResourceDescriptor::getAliases()

      ## New:
      method java.util.List<java.net.URI> org.xwiki.contrib.activitypub.webfinger.entities.JSONResourceDescriptor::getAliases()
  • Not breaking: Unstable API.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method java.lang.String org.xwiki.contrib.activitypub.webfinger.entities.Link::getHref()

      ## New:
      method java.net.URI org.xwiki.contrib.activitypub.webfinger.entities.Link::getHref()
  • Not breaking: Unstable API.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter org.xwiki.contrib.activitypub.webfinger.entities.Link org.xwiki.contrib.activitypub.webfinger.entities.Link::setHref(===java.lang.String===)

      ## New:
      parameter org.xwiki.contrib.activitypub.webfinger.entities.Link org.xwiki.contrib.activitypub.webfinger.entities.Link::setHref(===java.net.URI===)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method java.lang.String org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(org.xwiki.user.UserReference) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException

      ## New:
      method java.net.URI org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(org.xwiki.user.UserReference) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter java.lang.String org.xwiki.contrib.activitypub.webfinger.script.WebfingerScriptService::getWebfingerId(===org.xwiki.model.reference.DocumentReference===)

      ## New:
      parameter java.lang.String org.xwiki.contrib.activitypub.webfinger.script.WebfingerScriptService::getWebfingerId(===org.xwiki.contrib.activitypub.entities.AbstractActor===)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter java.util.List<org.xwiki.contrib.activitypub.entities.AbstractActor> org.xwiki.contrib.activitypub.script.ActivityPubScriptService::followers(===java.lang.String===)

      ## New:
      parameter java.util.List<org.xwiki.contrib.activitypub.entities.AbstractActor> org.xwiki.contrib.activitypub.script.ActivityPubScriptService::followers(===org.xwiki.contrib.activitypub.entities.AbstractActor===)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter java.util.List<org.xwiki.contrib.activitypub.entities.AbstractActor> org.xwiki.contrib.activitypub.script.ActivityPubScriptService::following(===java.lang.String===)

      ## New:
      parameter java.util.List<org.xwiki.contrib.activitypub.entities.AbstractActor> org.xwiki.contrib.activitypub.script.ActivityPubScriptService::following(===org.xwiki.contrib.activitypub.entities.AbstractActor===)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method org.xwiki.contrib.activitypub.entities.AbstractActor org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveActivityPubUser(java.lang.String) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method java.net.URI org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveActivityPubUserUrl(java.lang.String) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.parameterTypeChanged
    • Code:
      ## Old:
      parameter java.lang.String org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(===org.xwiki.user.UserReference===) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException

      ## New:
      parameter java.net.URI org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(===org.xwiki.contrib.activitypub.entities.AbstractActor===) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.returnTypeChanged
    • Code:
      ## Old:
      method java.lang.String org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(org.xwiki.user.UserReference) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException

      ## New:
      method java.net.URI org.xwiki.contrib.activitypub.webfinger.WebfingerService::resolveXWikiUserUrl(org.xwiki.contrib.activitypub.entities.AbstractActor) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API. Moved to URLHandler.
    • Violation type:
      java.method.removed
    • Code:
      ## Old:
      method boolean org.xwiki.contrib.activitypub.ActivityPubStorage::belongsToCurrentInstance(java.net.URI)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method java.lang.String org.xwiki.contrib.activitypub.webfinger.WebfingerService::getWebFingerIdentifier(org.xwiki.contrib.activitypub.entities.AbstractActor) throws org.xwiki.contrib.activitypub.webfinger.WebfingerException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method java.util.List<org.xwiki.contrib.activitypub.webfinger.entities.JSONResourceDescriptor> org.xwiki.contrib.activitypub.ActivityPubStorage::searchWebFinger(java.lang.String, int) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method void org.xwiki.contrib.activitypub.ActivityPubStorage::storeWebFinger(org.xwiki.contrib.activitypub.webfinger.entities.JSONResourceDescriptor) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method <T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject> java.util.List<T> org.xwiki.contrib.activitypub.ActivityPubStorage::query(java.lang.Class<T>, java.lang.String, int) throws org.xwiki.contrib.activitypub.ActivityPubException
  • Not breaking: Unstable API.
    • Violation type:
      java.annotation.removed
    • Code:
      ## Old:
      class org.xwiki.contrib.activitypub.entities.ActivityPubObjectReference<T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject>

      ## New:
      class org.xwiki.contrib.activitypub.entities.ActivityPubObjectReference<T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject>
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method java.util.Set<org.xwiki.contrib.activitypub.entities.AbstractActor> org.xwiki.contrib.activitypub.ActivityPubObjectReferenceResolver::resolveTargets(org.xwiki.contrib.activitypub.entities.ActivityPubObject)
  • Not breaking: Unstable API.
    • Violation type:
      java.method.addedToInterface
    • Code:
      ## Old:
      null

      ## New:
      method <T extends org.xwiki.contrib.activitypub.entities.ActivityPubObject> boolean org.xwiki.contrib.activitypub.ActivityPubObjectReferenceResolver::shouldBeRefreshed(T)

Credits

The following people have contributed code and translations to this release (sorted alphabetically):

Manuel Leduc
Simon Urli

Thanks to contributors of XWiki 12.2 & 12.3 for their direct or indirect contributions too emoticon_smile

The development of ActivityPub 1.2 has been partly funded by NLnet fundation as part of the NGI Search & Discovery call.

Tags:
   

Get Connected