From: Steinar H. Gunderson Date: Sat, 28 Oct 2023 22:25:11 +0000 (+0200) Subject: Simplification in event.pl. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=fa14e15f239e46b28fe858e4bc8ad613a39bafc4;p=skvidarsync Simplification in event.pl. --- diff --git a/www/event.pl b/www/event.pl index c99da21..093754d 100755 --- a/www/event.pl +++ b/www/event.pl @@ -73,11 +73,7 @@ if (exists($json->{'event'}) && exists($json->{'event'}{'type'})) { exit; } - if ($type eq 'reaction_added') { - $dbh->do('INSERT INTO reaction_log (userid, channel, ts, reaction, event_type, event_ts) VALUES (?,?,?,?,?,?)', undef, - $user, $channel, $ts, $reaction, $type, $event_ts); - mark(); - } elsif ($type eq 'reaction_removed') { + if ($type eq 'reaction_added' || $type eq 'reaction_removed') { $dbh->do('INSERT INTO reaction_log (userid, channel, ts, reaction, event_type, event_ts) VALUES (?,?,?,?,?,?)', undef, $user, $channel, $ts, $reaction, $type, $event_ts); mark();