Exec Body Fn should be passed Parent BotAction #43

Merged
modulatingforce merged 19 commits from parent-botaction-to-child-fn into main 2024-03-25 16:29:44 -04:00
Showing only changes of commit c0603739c9 - Show all commits

View file

@ -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