add: connect to socket by community
direct messages/groups connect by channel id, everything else should connect by channel with the "is_channel" header set to true
This commit is contained in:
parent
c1c8cdbfcd
commit
0304461389
20 changed files with 241 additions and 160 deletions
|
@ -211,7 +211,7 @@ pub async fn message_request(
|
|||
}
|
||||
};
|
||||
|
||||
let message: Message = match serde_json::from_str(&req.data) {
|
||||
let message: (String, Message) = match serde_json::from_str(&req.data) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
return Err(Html(
|
||||
|
@ -220,6 +220,8 @@ pub async fn message_request(
|
|||
}
|
||||
};
|
||||
|
||||
let message = message.1;
|
||||
|
||||
let membership = match data
|
||||
.0
|
||||
.get_membership_by_owner_community(user.id, community)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue