From 638d29a82061daaa59348db987d1da18b735da1b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 9 Apr 2011 17:11:38 -0400 Subject: [PATCH] Hide RSVPs from threaded notice output --- plugins/Event/EventPlugin.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/Event/EventPlugin.php b/plugins/Event/EventPlugin.php index aca2922f17..978b4610b2 100644 --- a/plugins/Event/EventPlugin.php +++ b/plugins/Event/EventPlugin.php @@ -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))); + } } -- 2.39.5