send message by message receive opt

This commit is contained in:
Gordon
2021-12-06 20:03:59 +08:00
parent cd14f3e649
commit 33b9685985
3 changed files with 62 additions and 9 deletions
+4 -1
View File
@@ -116,8 +116,11 @@ func JsonStringToMap(str string) (tempMap map[string]interface{}) {
return tempMap
}
func GetSwitchFromOptions(Options map[string]interface{}, key string) (result bool) {
if flag, ok := Options[key]; !ok || flag == 1 {
if flag, ok := Options[key]; !ok || flag.(int) == 1 {
return true
}
return false
}
func SetSwitchFromOptions(Options map[string]interface{}, key string, value interface{}) {
Options[key] = value
}