add: user status

This commit is contained in:
trisua 2025-05-03 11:29:31 -04:00
parent 1724f798ca
commit a009ef9e34
10 changed files with 259 additions and 138 deletions

View file

@ -165,13 +165,13 @@ impl DataManager {
// post event
let mut con = self.2.get_con().await;
if let Err(e) = con.publish::<usize, String, ()>(
if let Err(e) = con.publish::<String, String, ()>(
if channel.community != 0 {
// broadcast to community ws
channel.community
format!("chats/{}", channel.community)
} else {
// broadcast to channel ws
channel.id
format!("chats/{}", channel.id)
},
serde_json::to_string(&SocketMessage {
method: SocketMethod::Message,
@ -224,13 +224,13 @@ impl DataManager {
// post event
let mut con = self.2.get_con().await;
if let Err(e) = con.publish::<usize, String, ()>(
if let Err(e) = con.publish::<String, String, ()>(
if channel.community != 0 {
// broadcast to community ws
channel.community
format!("chats/{}", channel.community)
} else {
// broadcast to channel ws
channel.id
format!("chats/{}", channel.id)
},
serde_json::to_string(&SocketMessage {
method: SocketMethod::Delete,