In GNU social version 2 this was accomplished by using a module named TheFreeNetwork
that would act as a mediator in specific operations concerning the federation plugins.
In version 3 this was simplified around the Notification
component,
which asks the FreeNetwork
component to procedurally call the handlers in the protocol handlers. Although this works via events, we are modelling a service behaviour here.
The remote notification queue is also handled by the Notification
component.
TheFreeNetwork
component became devoted to handling WebFinger-related
matters, it's involvement in this is just defining sequence, helpers and setting the API
for the various protocol plugins:
onAddFreeNetworkProtocol
: Let FreeNetwork Component know a protocol exists and which class to use to call the freeNetworkDistribute
methodFreeNetworkActorProtocol::protocolSucceeded
: If the protocol plugin can handle a certain actor, register itonFreeNetworkActorCanAdmin
: Fill Actor->canAdmin() for Actors that came from a certain ProtocolfreeNetworkGrabRemote
: The FreeNetwork
component will call this function to pull objects by URIprotocol::freeNetworkDistribute
: The FreeNetwork
component will call this function to distribute this instance's activitiesThere are also other methods that the FreeNetwork
component makes available
for plugins, but are meant for WebFinger-related helpers such as onFreeNetworkFoundXrd
and FreeNetworkActorProtocol::canIAddr
.