Notifs only sent for BotAdmins
This commit is contained in:
parent
10d25bf34f
commit
c0603739c9
1 changed files with 10 additions and 3 deletions
|
@ -311,10 +311,15 @@ impl Chat {
|
||||||
// if !(user_roles.contains(&identity::UserRole::Mod(Channel(channel_login.clone())))
|
// 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::SupMod(Channel(channel_login.clone())))
|
||||||
// || user_roles.contains(&identity::UserRole::Broadcaster))
|
// || 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())))
|
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::SupMod(Channel(channel_login.clone())))
|
||||||
|| user_roles.contains(&identity::UserRole::Broadcaster)
|
|| user_roles.contains(&identity::UserRole::Broadcaster)
|
||||||
|| user_roles.contains(&identity::UserRole::BotAdmin))
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -328,8 +333,10 @@ impl Chat {
|
||||||
|
|
||||||
match msginput {
|
match msginput {
|
||||||
BotMsgType::Notif(_) => {
|
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)
|
// If Sender is Not a BotAdmin, don't do anything about the notification and return
|
||||||
return // return in this case - the User should not see a notification if this path is reached
|
if !user_roles.contains(&identity::UserRole::BotAdmin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
BotMsgType::SayInReplyTo(_,_ ) | BotMsgType::Say(_,_) => {
|
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
|
// If the BotMsg a Say/SayInReplyTo (from Developer or Chatter) , and the Sender does not have Specific Roles in the Source Channel Sent
|
||||||
|
|
Loading…
Reference in a new issue