feat: support lark app now (close #41)

This commit is contained in:
JustSong
2023-05-08 10:39:30 +08:00
parent 00a9f02974
commit 5b5a56122b
8 changed files with 297 additions and 42 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ const (
TypeNone = "none"
TypeOneBot = "one_bot"
TypeGroup = "group"
TypeLarkApp = "lark_app"
)
type Channel struct {
@@ -61,7 +62,7 @@ func GetChannelByName(name string, userId int) (*Channel, error) {
}
func GetTokenStoreChannels() (channels []*Channel, err error) {
err = DB.Where("type = ? or type = ?", TypeWeChatCorpAccount, TypeWeChatTestAccount).Find(&channels).Error
err = DB.Where("type in ?", []string{TypeWeChatCorpAccount, TypeWeChatTestAccount, TypeLarkApp}).Find(&channels).Error
return channels, err
}