Eventify Notice getAsTimestamp (for Deleted_notice)

This commit is contained in:
Mikael Nordfeldth
2016-01-13 21:01:47 +01:00
parent 29b45bb87a
commit 45dd343126
2 changed files with 32 additions and 18 deletions

View File

@@ -34,6 +34,18 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
return true;
}
public function onGetNoticeSqlTimestamp($id, &$timestamp)
{
try {
$deleted = Deleted_notice::getByID($id);
$timestamp = $deleted->act_created;
} catch (NoResultException $e) {
return true;
}
// we're done for the event, so return false to stop it
return false;
}
protected function getActionTitle(ManagedAction $action, $verb, Notice $target, Profile $scoped)
{
// FIXME: switch based on action type