If NotifyProps["mention_keys"] (aka "Words That Trigger Mentions") is empty, strings.Split(mentionkeys, ",") creates a slice with one element, the empty string - []string{""} rather than an empty slice ([]string{}). This causes all lines to match.
We can handle it at the strings.Split(), or around it. But I thought best to handle it in the loop in case the user does something like test1,test2,,test3 where there is an accidental comma.
This fixes https://github.com/42wim/matterircd/issues/561
If NotifyProps["mention_keys"] (aka "Words That Trigger Mentions") is empty,
strings.Split(mentionkeys, ",")
creates a slice with one element, the empty string -[]string{""}
rather than an empty slice ([]string{}
). This causes all lines to match.We can handle it at the
strings.Split()
, or around it. But I thought best to handle it in the loop in case the user does something liketest1,test2,,test3
where there is an accidental comma.