实现基础的通知媒介管理

This commit is contained in:
GoEdgeLab
2021-04-05 20:48:33 +08:00
parent 975b307ac1
commit b0990961b8
41 changed files with 2467 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
package models
import (
"encoding/json"
"github.com/iwind/TeaGo/logs"
)
// 解析分组ID
func (this *MessageRecipient) DecodeGroupIds() []int64 {
if len(this.GroupIds) == 0 {
return []int64{}
}
result := []int64{}
err := json.Unmarshal([]byte(this.GroupIds), &result)
if err != nil {
logs.Println("MessageRecipient.DecodeGroupIds(): " + err.Error())
// 不阻断执行
}
return result
}