add: user status
This commit is contained in:
parent
1724f798ca
commit
a009ef9e34
10 changed files with 259 additions and 138 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue