From 4ebfa4f82679b5edafca70b2da1646d5d1b2decc Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 16 May 2024 21:58:52 +0500 Subject: upd: send nothing if the channel is opted out --- src/commands/request_util.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/commands/request_util.cpp') diff --git a/src/commands/request_util.cpp b/src/commands/request_util.cpp index 3d44054..90750e5 100644 --- a/src/commands/request_util.cpp +++ b/src/commands/request_util.cpp @@ -65,6 +65,11 @@ namespace bot::command { schemas::Channel channel(query[0]); + if (channel.get_opted_out_at().has_value()) { + delete work; + return std::nullopt; + } + query = work->exec("SELECT * FROM channel_preferences WHERE channel_id = " + std::to_string(channel.get_id())); -- cgit v1.2.3