Skip to content

Commit 5c02fc6

Browse files
committed
fix: get user contacts
1 parent d890476 commit 5c02fc6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: models/user.go

+18
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,26 @@ func (u *User) ExtractToken(key string) (string, bool) {
880880
}
881881

882882
switch key {
883+
case Dingtalk:
884+
ret := gjson.GetBytes(bs, DingtalkKey)
885+
return ret.String(), ret.Exists()
886+
case Wecom:
887+
ret := gjson.GetBytes(bs, WecomKey)
888+
return ret.String(), ret.Exists()
889+
case Feishu, FeishuCard:
890+
ret := gjson.GetBytes(bs, FeishuKey)
891+
return ret.String(), ret.Exists()
892+
case Mm:
893+
ret := gjson.GetBytes(bs, MmKey)
894+
return ret.String(), ret.Exists()
895+
case Telegram:
896+
ret := gjson.GetBytes(bs, TelegramKey)
897+
return ret.String(), ret.Exists()
883898
case Email:
884899
return u.Email, u.Email != ""
900+
case Lark, LarkCard:
901+
ret := gjson.GetBytes(bs, LarkKey)
902+
return ret.String(), ret.Exists()
885903
case Phone:
886904
return u.Phone, u.Phone != ""
887905
default:

0 commit comments

Comments
 (0)