add: live browser notifications
This commit is contained in:
parent
58d206eb81
commit
98d6f21e6e
18 changed files with 291 additions and 15 deletions
|
@ -40,6 +40,10 @@ pub struct User {
|
|||
/// External service connection details.
|
||||
#[serde(default)]
|
||||
pub connections: UserConnections,
|
||||
/// Subscribed channels data. Each entry is a channel ID, as well as the ID of
|
||||
/// the last message the user saw in that channel.
|
||||
#[serde(default)]
|
||||
pub subscriptions: HashMap<usize, usize>,
|
||||
}
|
||||
|
||||
pub type UserConnections =
|
||||
|
@ -232,6 +236,7 @@ impl User {
|
|||
post_count: 0,
|
||||
request_count: 0,
|
||||
connections: HashMap::new(),
|
||||
subscriptions: HashMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,14 +375,12 @@ pub struct ExternalConnectionInfo {
|
|||
pub show_on_profile: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Default)]
|
||||
pub struct ExternalConnectionData {
|
||||
pub external_urls: HashMap<String, String>,
|
||||
pub data: HashMap<String, String>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Notification {
|
||||
pub id: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue