Hide RSVPs from threaded notice output

This commit is contained in:
Evan Prodromou 2011-04-09 17:11:38 -04:00
parent b80ece1691
commit 638d29a820
1 changed files with 14 additions and 0 deletions

View File

@ -488,4 +488,18 @@ class EventPlugin extends MicroappPlugin
$action->cssLink($this->path('event.css'));
return true;
}
function onStartShowThreadedNoticeTail($nli, $notice, &$children)
{
// Filter out any poll responses
if ($notice->object_type == Happening::OBJECT_TYPE) {
$children = array_filter($children, array($this, 'isNotRSVP'));
}
return true;
}
function isNotRSVP($notice)
{
return (!in_array($notice->object_type, array(RSVP::POSITIVE, RSVP::NEGATIVE, RSVP::POSSIBLE)));
}
}