[TheFreeNetwork] First code: Module class and census event

This commit is contained in:
tenma
2019-10-30 23:09:38 +00:00
committed by Diogo Peralta Cordeiro
parent 128c2c2e15
commit b19da881c7
5 changed files with 92 additions and 0 deletions

View File

@@ -230,6 +230,18 @@ class ActivityPubPlugin extends Plugin
return true;
}
/**
* Subscribe AP's profile class to the TFN module
*
* @param array $federation
* @return bool event hook return
*/
public function onStartTFNCensus(array &$federation): bool
{
$federation[] = 'Activitypub_profile';
return true;
}
/**
* Set up queue handlers for required interactions
*

View File

@@ -1440,6 +1440,18 @@ class OStatusPlugin extends Plugin
return true;
}
/**
* Subscribe OS's profile class to the TFN module
*
* @param array $federation
* @return bool event hook return
*/
public function onStartTFNCensus(array &$federation): bool
{
$federation[] = 'Ostatus_profile';
return true;
}
/**
* Utility function to check if the given URI is a canonical group profile
* page, and if so return the ID number.