fix: correct ordering for creating ownership change event
This commit is contained in:
1 parent
7bdd2d69d6
commit
229d4e2e1d
1 file changed
+2
-2
@@ -83,11 +83,11 @@ pub async fn req(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Transfer ownership
|
// Transfer ownership
|
||||||
*owner = new_owner.to_string();
|
let old_owner = std::mem::replace(owner, new_owner.to_string());
|
||||||
|
|
||||||
// Notify clients
|
// Notify clients
|
||||||
SystemMessage::ChannelOwnershipChanged {
|
SystemMessage::ChannelOwnershipChanged {
|
||||||
from: owner.to_string(),
|
from: old_owner,
|
||||||
to: new_owner,
|
to: new_owner,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user