mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Messaging: Upsert mentions into unreads.
Messaging: Allow multiple attachment upload.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -113,6 +113,6 @@ pub async fn generate_ready(mut user: User) -> Result<ClientboundNotification> {
|
||||
Ok(ClientboundNotification::Ready {
|
||||
users,
|
||||
servers,
|
||||
channels
|
||||
channels,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user