From fa14e15f239e46b28fe858e4bc8ad613a39bafc4 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 29 Oct 2023 00:25:11 +0200 Subject: [PATCH] Simplification in event.pl. --- www/event.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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(); -- 2.39.2