reworked broadcaster check in identity
This commit is contained in:
parent
bed61c2830
commit
0f1cb576a4
1 changed files with 9 additions and 12 deletions
|
@ -1283,22 +1283,19 @@ impl IdentityManager {
|
||||||
|
|
||||||
// Checks if broadcaster
|
// Checks if broadcaster
|
||||||
let channel_out = match channel {
|
let channel_out = match channel {
|
||||||
Some(channel_tmp) => {
|
Some(chnl) => {
|
||||||
match channel_tmp {
|
|
||||||
Channel(channel_tmp) => {
|
|
||||||
// In this block, Some input channel is given
|
// In this block, Some input channel is given
|
||||||
// We're comparing the channel name with chattername to determine if they're a broadcaster
|
// We're comparing the channel name with chattername to determine if they're a broadcaster
|
||||||
if chattername == channel_tmp.to_lowercase() {
|
if chattername == chnl.0
|
||||||
|
{
|
||||||
evalsproles.push(UserRole::Broadcaster);
|
evalsproles.push(UserRole::Broadcaster);
|
||||||
}
|
}
|
||||||
|
Some(chnl)
|
||||||
Some(Channel::construct(channel_tmp))
|
},
|
||||||
} // _ => ()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let rolesdb = Arc::clone(&self.special_roles_users);
|
let rolesdb = Arc::clone(&self.special_roles_users);
|
||||||
|
|
||||||
let rolesdb_lock = rolesdb.read().await;
|
let rolesdb_lock = rolesdb.read().await;
|
||||||
|
|
Loading…
Reference in a new issue