]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityobject.php
FavorAction now uses Notice::saveActivity
[quix0rs-gnu-social.git] / lib / activityobject.php
index b3940be824b9a0ab5c34d91f99c85b9241c02f31..d0b929245e152e0ecd8a65d568ea39999f905a8b 100644 (file)
@@ -431,32 +431,6 @@ class ActivityObject
         }
     }
 
-    static function fromNotice(Notice $notice)
-    {
-        $object = new ActivityObject();
-
-        if (Event::handle('StartActivityObjectFromNotice', array($notice, &$object))) {
-
-            $object->type    = (empty($notice->object_type)) ? ActivityObject::NOTE : $notice->object_type;
-
-            $object->id      = $notice->uri;
-            $object->title = 'New ' . self::canonicalType($object->type) . ' by ';
-            try {
-                $object->title .= $notice->getProfile()->getAcctUri();
-            } catch (ProfileNoAcctUriException $e) {
-                $object->title .= $e->profile->nickname;
-            }
-            $object->content = $notice->rendered;
-            $object->link    = $notice->getUrl();
-
-            $object->extra[] = array('status_net', array('notice_id' => $notice->id));
-
-            Event::handle('EndActivityObjectFromNotice', array($notice, &$object));
-        }
-
-        return $object;
-    }
-
     static function fromGroup(User_group $group)
     {
         $object = new ActivityObject();