Closed nielsole closed 2 years ago
This should be testable with a unit test really good. I'll give you some time for that, otherwise taking a look myself potentially. Let me know if anything is unclear.
Added a unit test and replaced another occurrence where Firstname could be nil. I never saw that occurrence be nil, but I guess graceful handling of empty fields is always a good idea.
Merry Christmas btw :)
Thank you so much for this! Hope you had a great time off as well!
chat.Username is not always set. "len(string) > 0" evaluates to false for both the empty string and nil.
Closes https://github.com/metalmatze/alertmanager-bot/issues/196
this was not tested