. */ if (!defined('GNUSOCIAL')) { exit(1); } /** * Diaspora federation protocol plugin for GNU Social * * Depends on: * - OStatus plugin * - WebFinger plugin * * @package ProtocolDiasporaPlugin * @maintainer Mikael Nordfeldth */ class DiasporaPlugin extends Plugin { const REL_SEED_LOCATION = 'http://joindiaspora.com/seed_location'; const REL_GUID = 'http://joindiaspora.com/guid'; const REL_PUBLIC_KEY = 'diaspora-public-key'; public function onEndAttachPubkeyToUserXRD(Magicsig $magicsig, XML_XRD $xrd, Profile $target) { $xrd->links[] = new XML_XRD_Element_Link(self::REL_PUBLIC_KEY, base64_encode($magicsig->exportPublicKey())); } public function onPluginVersion(array &$versions) { $versions[] = array('name' => 'Diaspora', 'version' => '0.1', 'author' => 'Mikael Nordfeldth', 'homepage' => 'https://gnu.io/social', // TRANS: Plugin description. 'rawdescription' => _m('Follow people across social networks that implement '. 'the Diaspora federation protocol.')); return true; } }