mirror of
https://github.com/dani/vroom.git
synced 2024-06-18 04:09:14 +02:00
Event when sending join notif
This commit is contained in:
parent
29fe78db45
commit
95efab95a4
|
@ -1229,6 +1229,14 @@ systemctl restart vroom.service</pre>
|
|||
An API action was allowed
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
join_notification
|
||||
</td>
|
||||
<td>
|
||||
An email notification was sent because someone joined a room
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
|
|
7
vroom.pl
7
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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user