X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FXmpp%2FXmppPlugin.php;h=002055309d7e7090072b2ef277d1696aa966e416;hb=546a03b5eac5f172d543a889625e2f4de446e8b7;hp=a5666e5aa6700b045fb656c92c81bb6f8361e63f;hpb=8fdc999be41e5d0c51a3b1bbe666b8859518ed3d;p=quix0rs-gnu-social.git diff --git a/plugins/Xmpp/XmppPlugin.php b/plugins/Xmpp/XmppPlugin.php index a5666e5aa6..002055309d 100644 --- a/plugins/Xmpp/XmppPlugin.php +++ b/plugins/Xmpp/XmppPlugin.php @@ -49,7 +49,7 @@ class XmppPlugin extends ImPlugin public $server = null; public $port = 5222; public $user = 'update'; - public $resource = null; + public $resource = 'gnusocial'; public $encryption = true; public $password = null; public $host = null; // only set if != server @@ -59,7 +59,7 @@ class XmppPlugin extends ImPlugin function getDisplayName(){ // TRANS: Plugin display name. - return _m('XMPP/Jabber/GTalk'); + return _m('XMPP/Jabber'); } /** @@ -318,7 +318,7 @@ class XmppPlugin extends ImPlugin $this->queuedConnection()->message($screenname, $body, 'chat'); } - function sendNotice($screenname, $notice) + function sendNotice($screenname, Notice $notice) { $msg = $this->formatNotice($notice); $entry = $this->format_entry($notice); @@ -346,7 +346,8 @@ class XmppPlugin extends ImPlugin $xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml')); $xs->element('a', array('href' => $profile->profileurl), $profile->nickname); try { - $orig_profile = $notice->getParent()->getProfile(); + $parent = $notice->getParent(); + $orig_profile = $parent->getProfile(); $orig_profurl = $orig_profile->getUrl(); $xs->text(" => "); $xs->element('a', array('href' => $orig_profurl), $orig_profile->nickname); @@ -443,7 +444,7 @@ class XmppPlugin extends ImPlugin * * @return boolean hook return */ - function onGetValidDaemons(&$daemons) + function onGetValidDaemons(array &$daemons) { if( isset($this->server) && isset($this->port) && @@ -461,10 +462,10 @@ class XmppPlugin extends ImPlugin } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'XMPP', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews, Evan Prodromou', 'homepage' => 'http://status.net/wiki/Plugin:XMPP', 'rawdescription' =>