diff --git a/src/core/chat.rs b/src/core/chat.rs index e82fd0a..c36fcf7 100644 --- a/src/core/chat.rs +++ b/src/core/chat.rs @@ -311,10 +311,15 @@ impl Chat { // if !(user_roles.contains(&identity::UserRole::Mod(Channel(channel_login.clone()))) // || user_roles.contains(&identity::UserRole::SupMod(Channel(channel_login.clone()))) // || user_roles.contains(&identity::UserRole::Broadcaster)) + // if !(user_roles.contains(&identity::UserRole::Mod(Channel(channel_login.clone()))) + // || user_roles.contains(&identity::UserRole::SupMod(Channel(channel_login.clone()))) + // || user_roles.contains(&identity::UserRole::Broadcaster) + // || user_roles.contains(&identity::UserRole::BotAdmin)) + if !(user_roles.contains(&identity::UserRole::Mod(Channel(channel_login.clone()))) || user_roles.contains(&identity::UserRole::SupMod(Channel(channel_login.clone()))) || user_roles.contains(&identity::UserRole::Broadcaster) - || user_roles.contains(&identity::UserRole::BotAdmin)) + ) { @@ -328,8 +333,10 @@ impl Chat { match msginput { BotMsgType::Notif(_) => { - // If the BotMsg is an Error Notification , and the Sender does not have Specific Roles in the Source Channel Sent (where the Error Notif will be sent) - return // return in this case - the User should not see a notification if this path is reached + // If Sender is Not a BotAdmin, don't do anything about the notification and return + if !user_roles.contains(&identity::UserRole::BotAdmin) { + return; + } }, BotMsgType::SayInReplyTo(_,_ ) | BotMsgType::Say(_,_) => { // If the BotMsg a Say/SayInReplyTo (from Developer or Chatter) , and the Sender does not have Specific Roles in the Source Channel Sent