Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit c531c0e

Browse files
committed
Letting all users request sound effects if no authorized list is provided in the config
1 parent 21ff820 commit c531c0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

+5
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ func executeTwitchMessage(message twitch.PrivateMessage, allSoundDirectories []s
186186
func isAuthorized(user string) bool {
187187
allAuthorizedUsers := viper.GetStringSlice("twitch_authorized_users")
188188

189+
// Let all users play sound effects if we haven't specified a list of authorized users
190+
if len(allAuthorizedUsers) == 0 {
191+
return true
192+
}
193+
189194
if strings.ToLower(user) == strings.ToLower(viper.GetString("twitch_username")) {
190195
return true
191196
}

0 commit comments

Comments
 (0)