diff --git a/templates/default/documentation.html.ep b/templates/default/documentation.html.ep index 05e7963..c6ada2b 100644 --- a/templates/default/documentation.html.ep +++ b/templates/default/documentation.html.ep @@ -1229,6 +1229,14 @@ systemctl restart vroom.service An API action was allowed + + + join_notification + + + An email notification was sent because someone joined a room + +

diff --git a/vroom.pl b/vroom.pl index 9d9f1e9..9ffc573 100755 --- a/vroom.pl +++ b/vroom.pl @@ -2068,8 +2068,11 @@ any '/api' => sub { # Send notifications my $recipients = $self->get_email_notifications($room->{name}); foreach my $rcpt (keys %{$recipients}){ - # TODO: log an event - $self->app->log->debug('Sending an email to ' . $recipients->{$rcpt}->{email}); + $self->log_event( + event => 'join_notification', + msg => 'Sending an email to ' . $recipients->{$rcpt}->{email} . + ' to inform that someone joined room ' . $room->{name} + ); my $sent = $self->mail( to => $recipients->{$rcpt}->{email}, subject => $subj,