Messaging: Upsert mentions into unreads.

Messaging: Allow multiple attachment upload.
This commit is contained in:
Paul
2021-06-22 17:42:18 +01:00
parent b10d4f3559
commit ad06ff16c4
28 changed files with 116 additions and 92 deletions

View File

@@ -5,10 +5,7 @@ use rocket_contrib::json::JsonValue;
use serde::{Deserialize, Serialize};
use super::hive::{get_hive, subscribe_if_exists};
use crate::{
database::*,
util::result::{Result},
};
use crate::{database::*, util::result::Result};
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(tag = "error")]
@@ -63,14 +60,14 @@ pub enum ClientboundNotification {
Ready {
users: Vec<User>,
servers: Vec<Server>,
channels: Vec<Channel>
channels: Vec<Channel>,
},
Message(Message),
MessageUpdate {
id: String,
channel: String,
data: JsonValue
data: JsonValue,
},
MessageDelete {
id: String,
@@ -106,7 +103,7 @@ pub enum ClientboundNotification {
ChannelAck {
id: String,
user: String,
message_id: String
message_id: String,
},
ServerUpdate {

View File

@@ -113,6 +113,6 @@ pub async fn generate_ready(mut user: User) -> Result<ClientboundNotification> {
Ok(ClientboundNotification::Ready {
users,
servers,
channels
channels,
})
}