forked from jmug/stoatchat
fix: update branch from main
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -4451,10 +4451,10 @@ dependencies = [
|
|||||||
"fnv",
|
"fnv",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote 1.0.38",
|
"quote 1.0.40",
|
||||||
"regex-syntax 0.8.5",
|
"regex-syntax 0.8.5",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
"syn 2.0.94",
|
"syn 2.0.101",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ impl Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate the mentions go to users in the channel/server
|
// Validate the mentions go to users in the channel/server
|
||||||
if !mentions.is_empty() {
|
if !user_mentions.is_empty() {
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
match channel {
|
match channel {
|
||||||
Channel::DirectMessage { ref recipients, .. }
|
Channel::DirectMessage { ref recipients, .. }
|
||||||
|
|||||||
@@ -244,9 +244,14 @@ pub async fn update_voice_state(
|
|||||||
pub async fn get_voice_channel_members(channel_id: &str) -> Result<Option<Vec<String>>> {
|
pub async fn get_voice_channel_members(channel_id: &str) -> Result<Option<Vec<String>>> {
|
||||||
get_connection()
|
get_connection()
|
||||||
.await?
|
.await?
|
||||||
.smembers(format!("vc_members:{}", channel_id))
|
.smembers::<_, Option<Vec<String>>>(format!("vc_members:{}", channel_id))
|
||||||
.await
|
.await
|
||||||
.to_internal_error()
|
.to_internal_error()
|
||||||
|
.map(|opt| opt.and_then(|v| if v.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(v)
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_voice_state(
|
pub async fn get_voice_state(
|
||||||
|
|||||||
@@ -616,6 +616,8 @@ mod test {
|
|||||||
nickname: None,
|
nickname: None,
|
||||||
roles: Some(vec![role_id.clone()]),
|
roles: Some(vec![role_id.clone()]),
|
||||||
timeout: None,
|
timeout: None,
|
||||||
|
can_publish: None,
|
||||||
|
can_receive: None
|
||||||
},
|
},
|
||||||
vec![],
|
vec![],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ mod test {
|
|||||||
name: "Voice Channel".to_string(),
|
name: "Voice Channel".to_string(),
|
||||||
description: None,
|
description: None,
|
||||||
nsfw: Some(false),
|
nsfw: Some(false),
|
||||||
|
voice: None
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user