FavorAction now uses Notice::saveActivity

This commit is contained in:
Mikael Nordfeldth
2014-07-05 23:39:17 +02:00
parent aa33b7f21c
commit fffacaa27c
9 changed files with 166 additions and 187 deletions

View 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();