]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Xmpp/XmppPlugin.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / Xmpp / XmppPlugin.php
index 17e8b8d50a48225dd053a5f04cb90c587b48c64e..7112b8b63eaeb8013bf24be41ff05047ab8b1b33 100644 (file)
@@ -59,7 +59,7 @@ class XmppPlugin extends ImPlugin
 
     function getDisplayName(){
         // TRANS: Plugin display name.
-        return _m('XMPP/Jabber/GTalk');
+        return _m('XMPP/Jabber');
     }
 
     /**
@@ -308,11 +308,6 @@ class XmppPlugin extends ImPlugin
         return true;
     }
 
-    function microiduri($screenname)
-    {
-        return 'xmpp:' . $screenname;
-    }
-
     function sendMessage($screenname, $body)
     {
         $this->queuedConnection()->message($screenname, $body, 'chat');
@@ -354,15 +349,14 @@ class XmppPlugin extends ImPlugin
             $xs->text(": ");
         } catch (InvalidUrlException $e) {
             $xs->text(sprintf(' => %s', $orig_profile->nickname));
-        } catch (Exception $e) {
+        } catch (NoParentNoticeException $e) {
+            $xs->text(": ");
+        } catch (NoResultException $e) {
+            // Parent notice was probably deleted.
             $xs->text(": ");
         }
-        if (!empty($notice->rendered)) {
-            $notice->rendered = str_replace("\t", "", $notice->rendered);
-            $xs->raw($notice->rendered);
-        } else {
-            $xs->raw(common_render_content($notice->content, $notice));
-        }
+        // FIXME: Why do we replace \t with ''? is it just to make it pretty? shouldn't whitespace be handled well...?
+        $xs->raw(str_replace("\t", "", $notice->getRendered()));
         $xs->text(" ");
         $xs->element('a', array(
             'href'=>common_local_url('conversation',
@@ -444,7 +438,7 @@ class XmppPlugin extends ImPlugin
      *
      * @return boolean hook return
      */
-    function onGetValidDaemons(&$daemons)
+    function onGetValidDaemons(array &$daemons)
     {
         if( isset($this->server) &&
             isset($this->port)   &&
@@ -462,10 +456,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' =>