]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jabber.php
Merge branch 'master' of git://gitorious.org/laconica/mainline into 0.7.x
[quix0rs-gnu-social.git] / lib / jabber.php
index f1be5776813164dd5e37999d4a900d8eaf118c72..3fbb3e1ab9ee0c04c9ad263cc3ba43654b97a39b 100644 (file)
@@ -114,7 +114,7 @@ function jabber_connect($resource=null)
         try {
             $conn->connect(true); // true = persistent connection
         } catch (XMPPHP_Exception $e) {
-            common_log(LOG_ERROR, $e->getMessage());
+            common_log(LOG_ERR, $e->getMessage());
             return false;
         }
 
@@ -178,7 +178,7 @@ function jabber_format_entry($profile, $notice)
     $entry .= "<link href='" . htmlspecialchars($profile->profileurl) . "'/>\n";
     $entry .= "<link rel='self' type='application/rss+xml' href='" . $self_url . "'/>\n";
     $entry .= "<author><name>" . $profile->nickname . "</name></author>\n";
-    $entry .= "<icon>" . common_profile_avatar_url($profile, AVATAR_PROFILE_SIZE) . "</icon>\n";
+    $entry .= "<icon>" . $profile->avatarUrl(AVATAR_PROFILE_SIZE) . "</icon>\n";
     $entry .= "</source>\n";
     $entry .= "<title>" . htmlspecialchars($msg) . "</title>\n";
     $entry .= "<summary>" . htmlspecialchars($msg) . "</summary>\n";
@@ -186,6 +186,11 @@ function jabber_format_entry($profile, $notice)
     $entry .= "<id>". $notice->uri . "</id>\n";
     $entry .= "<published>".common_date_w3dtf($notice->created)."</published>\n";
     $entry .= "<updated>".common_date_w3dtf($notice->modified)."</updated>\n";
+    if ($notice->reply_to) {
+        $replyurl = common_local_url('shownotice',
+                                     array('notice' => $notice->reply_to));
+        $entry .= "<link rel='related' href='" . $replyurl . "'/>\n";
+    }
     $entry .= "</entry>\n";
 
     $html  = "\n<html xmlns='http://jabber.org/protocol/xhtml-im'>\n";