feat(push): include URL for each notification
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
use crate::util::variables::{USE_JANUARY, PUBLIC_URL};
|
use crate::util::variables::{USE_JANUARY, PUBLIC_URL, APP_URL};
|
||||||
use crate::{
|
use crate::{
|
||||||
database::*,
|
database::*,
|
||||||
notifications::{events::ClientboundNotification, websocket::is_online},
|
notifications::{events::ClientboundNotification, websocket::is_online},
|
||||||
@@ -21,6 +21,7 @@ pub struct PushNotification {
|
|||||||
pub body: String,
|
pub body: String,
|
||||||
pub tag: String,
|
pub tag: String,
|
||||||
pub timestamp: u64,
|
pub timestamp: u64,
|
||||||
|
pub url: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PushNotification {
|
impl PushNotification {
|
||||||
@@ -64,6 +65,7 @@ impl PushNotification {
|
|||||||
body,
|
body,
|
||||||
tag: channel.id().to_string(),
|
tag: channel.id().to_string(),
|
||||||
timestamp,
|
timestamp,
|
||||||
|
url: format!("{}/channel/{}/{}", *APP_URL, channel.id(), msg.id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user