From 9d7438d1cb803fe04396f655ee114f0f22ca139e Mon Sep 17 00:00:00 2001 From: Alex Emmet <111742636+Alex-Emmet@users.noreply.github.com> Date: Sun, 17 May 2026 21:35:22 +0200 Subject: [PATCH] [Add] Push notifications --- omikron-connector/src/omikron_connection.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/omikron-connector/src/omikron_connection.rs b/omikron-connector/src/omikron_connection.rs index 0637b73..c967a57 100755 --- a/omikron-connector/src/omikron_connection.rs +++ b/omikron-connector/src/omikron_connection.rs @@ -955,6 +955,12 @@ impl OmikronConnection { MessageState::Sent, ); + // Send push notification to Omega since user is offline + let push_msg = CommunicationValue::new(CommunicationType::push_notification) + .with_receiver(receiver_id as u64) + .add_data(DataTypes::sender_id, DataValue::Number(sender_id as i64)); + self.send_message(&push_msg).await; + // notify sender self.send_message( &CommunicationValue::new(CommunicationType::message_state) @@ -1071,6 +1077,12 @@ impl OmikronConnection { MessageState::Sent, ); + // Send push notification to Omega since user is offline + let push_msg = CommunicationValue::new(CommunicationType::push_notification) + .with_receiver(*receiver_id) + .add_data(DataTypes::sender_id, DataValue::Number(*sender_id as i64)); + self.send_message(&push_msg).await; + self.send_message( &CommunicationValue::new(CommunicationType::message_state) .with_id(cv.get_id())