feat(push): include URL for each notification

This commit is contained in:
Paul
2021-11-20 12:49:57 +00:00
parent 92c7f023b1
commit 53277cb235

View File

@@ -1,4 +1,4 @@
use crate::util::variables::{USE_JANUARY, PUBLIC_URL};
use crate::util::variables::{USE_JANUARY, PUBLIC_URL, APP_URL};
use crate::{
database::*,
notifications::{events::ClientboundNotification, websocket::is_online},
@@ -21,6 +21,7 @@ pub struct PushNotification {
pub body: String,
pub tag: String,
pub timestamp: u64,
pub url: String,
}
impl PushNotification {
@@ -64,6 +65,7 @@ impl PushNotification {
body,
tag: channel.id().to_string(),
timestamp,
url: format!("{}/channel/{}/{}", *APP_URL, channel.id(), msg.id),
}
}
}