From 0f1cb576a41856f1d16c664cc8f5b2ae33279224 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Sat, 23 Mar 2024 14:00:02 -0400 Subject: [PATCH] reworked broadcaster check in identity --- src/core/identity.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/core/identity.rs b/src/core/identity.rs index eb70d3c..4f683bd 100644 --- a/src/core/identity.rs +++ b/src/core/identity.rs @@ -1283,22 +1283,19 @@ impl IdentityManager { // Checks if broadcaster let channel_out = match channel { - Some(channel_tmp) => { - match channel_tmp { - Channel(channel_tmp) => { - // In this block, Some input channel is given - // We're comparing the channel name with chattername to determine if they're a broadcaster - if chattername == channel_tmp.to_lowercase() { - evalsproles.push(UserRole::Broadcaster); - } - - Some(Channel::construct(channel_tmp)) - } // _ => () + Some(chnl) => { + // In this block, Some input channel is given + // We're comparing the channel name with chattername to determine if they're a broadcaster + if chattername == chnl.0 + { + evalsproles.push(UserRole::Broadcaster); } - } + Some(chnl) + }, None => None, }; + let rolesdb = Arc::clone(&self.special_roles_users); let rolesdb_lock = rolesdb.read().await;