]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
updated NoticeTitle plugin to use new activity events
authorEvan Prodromou <evan@status.net>
Sun, 5 Dec 2010 21:31:43 +0000 (16:31 -0500)
committerEvan Prodromou <evan@status.net>
Sun, 5 Dec 2010 21:31:43 +0000 (16:31 -0500)
plugins/NoticeTitle/NoticeTitlePlugin.php

index a3b4489f2c6444b766fe2e96d06d6db1b1d01dd4..054c3d3e48a590b8b632997a6bfb270805ae2537 100644 (file)
@@ -259,12 +259,17 @@ class NoticeTitlePlugin extends Plugin
      * @return boolean hook value
      */
 
-    function onStartActivityTitle(&$notice, &$xs, &$output)
+    function onEndNoticeAsActivity($notice, &$activity)
     {
         $title = Notice_title::fromNotice($notice);
 
         if (!empty($title)) {
-            $output = $title;
+            foreach ($activity->objects as $obj) {
+                if ($obj->id == $notice->uri) {
+                    $obj->title = $title;
+                    break;
+                }
+            }
         }
 
         return true;