}
if ($type eq 'reaction_added') {
- $dbh->do('INSERT INTO reactions (userid, channel, ts, reaction) VALUES (?,?,?,?)', undef,
- $user, $channel, $ts, $reaction);
$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') {
- $dbh->do('DELETE FROM reactions WHERE userid=? AND channel=? AND ts=? AND reaction=?', undef,
- $user, $channel, $ts, $reaction);
$dbh->do('INSERT INTO reaction_log (userid, channel, ts, reaction, event_type, event_ts) VALUES (?,?,?,?,?,?)', undef,
$user, $channel, $ts, $reaction, $type, $event_ts);
mark();