fix: correct ordering for creating ownership change event

This commit is contained in:
Paul Makles
2022-07-15 21:46:41 +01:00
parent 7bdd2d69d6
commit 229d4e2e1d

View File

@@ -83,11 +83,11 @@ pub async fn req(
}
// Transfer ownership
*owner = new_owner.to_string();
let old_owner = std::mem::replace(owner, new_owner.to_string());
// Notify clients
SystemMessage::ChannelOwnershipChanged {
from: owner.to_string(),
from: old_owner,
to: new_owner,
}
} else {