postmoogle/bot
Slavi Pantaleev 16ce4314b9 Sanitize settings on Get() and add convenience getters
Sanitizing options on Get() ensures that when someone asks
for a given option which may not be defined (`nosubject`, `nosender`),
we'll return a valid value (`'true'` or `'false'`) and not `''` (empty
string, undefined).

This way, users do not need to wonder if "nosender is not set" is
handled like "true" or "false" or in some 3rd way. They also don't need
to think about "how to unset this setting, now that I've set it to something".
Options will appear to have a default sanitized value no matter if
they've explicitly been set or not.

The `NoSender()` and `NoSubject()` getters are just there for
convenience, so that we won't need to do casting in other places.
2022-08-24 10:16:28 +03:00
..
bot.go Sanitize settings on Get() and add convenience getters 2022-08-24 10:16:28 +03:00
command.go adjust stop's help message 2022-08-24 09:57:22 +03:00
data.go Sanitize settings on Get() and add convenience getters 2022-08-24 10:16:28 +03:00
message.go wip 2022-08-21 18:41:35 +03:00
sync.go wip 2022-08-21 18:41:35 +03:00