Fix bugs in moving channels that could cause channels to be stranded or moved unexpectedly
Made channel linking not query in a loop co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
ee16b2051e
commit
4ff44dfa3b
4 changed files with 152 additions and 95 deletions
|
@ -2474,6 +2474,11 @@ async fn move_channel(
|
|||
.move_channel(session.user_id, channel_id, from_parent, to)
|
||||
.await?;
|
||||
|
||||
if channels_to_send.is_empty() {
|
||||
response.send(Ack {})?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let members_from = db.get_channel_members(from_parent).await?;
|
||||
let members_to = db.get_channel_members(to).await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue