mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-20 00:53:01 +08:00
fix click cm audio permission button before auth (#8917)
1. When not authenticated, clicking the audio permission button on the cm will send audio data 2. Keep the cursor position code unchanged, because `show_remote_cursor` is false before auth, so subscription will not happen. 3. Keep the clipboard code unchanged, because the keyboard permission will also be determined in `try_sub_services`. If the clipboard permission is clicked before auth and the keyboard permission is clicked after auth, the clipboard service will not be subscribed. Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
1707987a7b
commit
f6aca4ca8e
@ -502,10 +502,12 @@ impl Connection {
|
||||
} else if &name == "audio" {
|
||||
conn.audio = enabled;
|
||||
conn.send_permission(Permission::Audio, enabled).await;
|
||||
if let Some(s) = conn.server.upgrade() {
|
||||
s.write().unwrap().subscribe(
|
||||
super::audio_service::NAME,
|
||||
conn.inner.clone(), conn.audio_enabled());
|
||||
if conn.authorized {
|
||||
if let Some(s) = conn.server.upgrade() {
|
||||
s.write().unwrap().subscribe(
|
||||
super::audio_service::NAME,
|
||||
conn.inner.clone(), conn.audio_enabled());
|
||||
}
|
||||
}
|
||||
} else if &name == "file" {
|
||||
conn.file = enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user