svn commit: [2304] trunk/lib/Act/Handler/WebAPI.pm: add a field to fetch the attendees of a talk

maddingue at free.fr maddingue at free.fr
Sun Jun 2 08:39:08 CEST 2013


Revision: 2304
Author:   maddingue
Date:     2013-06-02 08:39:08 +0200 (Sun, 02 Jun 2013)
Log Message:
-----------
add a field to fetch the attendees of a talk

Modified Paths:
--------------
    trunk/lib/Act/Handler/WebAPI.pm

Modified: trunk/lib/Act/Handler/WebAPI.pm
===================================================================
--- trunk/lib/Act/Handler/WebAPI.pm	2013-06-02 05:52:12 UTC (rev 2303)
+++ trunk/lib/Act/Handler/WebAPI.pm	2013-06-02 06:39:08 UTC (rev 2304)
@@ -48,6 +48,7 @@
            room     => \&_talk_room,
            speaker  => \&_talk_speaker,
            track    => \&_talk_track,
+           attendees=> \&_talk_attendees,
         },
         default => [ qw(title speaker room datetime) ],
     },
@@ -136,6 +137,13 @@
 }
 
 
+sub _talk_attendees {
+    my $talk = shift;
+    my $attendees = Act::User->attendees($talk->talk_id);
+    return join ",", map $_->user_id, @$attendees
+}
+
+
 sub _talk_datetime {
     my $talk = shift;
     return $Config->talks_show_schedule && $talk->datetime ? $talk->datetime->epoch : undef;



More information about the Act-cvs mailing list