From df092d17905f00544faed5ca17a618e243bcc283 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 13 Apr 2026 15:07:39 +0200 Subject: [PATCH] Add notify module and update notification SQL query: Introduced a new `notify` module for handling notifications. Updated the SQL query in `insert_notification_conn` to use `QUERY_INSERT_NOTIFICATION` instead of `QUERY_INSERT_NOTIFICATION_FULL`, simplifying the notification insertion process. --- src/worker/mod.rs | 1 + src/worker/notify.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/worker/mod.rs b/src/worker/mod.rs index d46842e..d4155f1 100644 --- a/src/worker/mod.rs +++ b/src/worker/mod.rs @@ -18,6 +18,7 @@ mod falukant_servants; mod falukant_debtors; mod falukant_transport_raid; mod political_benefits; +mod notify; mod sql; pub use base::Worker; diff --git a/src/worker/notify.rs b/src/worker/notify.rs index d270146..05028c8 100644 --- a/src/worker/notify.rs +++ b/src/worker/notify.rs @@ -1,6 +1,6 @@ use crate::db::{ConnectionPool, DbConnection, DbError}; use crate::message_broker::MessageBroker; -use crate::worker::sql::QUERY_INSERT_NOTIFICATION_FULL; +use crate::worker::sql::QUERY_INSERT_NOTIFICATION; /// Schreibt eine Notification in `falukant_log.notification`. /// @@ -25,12 +25,12 @@ pub fn insert_notification_conn( conn: &mut DbConnection, user_id: i32, tr: &str, - character_id: Option, + _character_id: Option, ) -> Result<(), DbError> { - conn.prepare("insert_notification_full", QUERY_INSERT_NOTIFICATION_FULL)?; + conn.prepare("insert_notification_full", QUERY_INSERT_NOTIFICATION)?; conn.execute( "insert_notification_full", - &[&user_id, &tr, &character_id], + &[&user_id, &tr], )?; Ok(()) }