fix: update CustomerSourceTypeWebChat to use ExternalSourceGuest and adjust related mappings
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package enums
|
||||
|
||||
const CustomerSourceTypeWebChat = ExternalSourceWebChat
|
||||
const CustomerSourceTypeWebChat = ExternalSourceGuest
|
||||
|
||||
func GetCustomerSourceTypeLabel(sourceType ExternalSource) string {
|
||||
return GetExternalSourceLabel(ExternalSource(sourceType))
|
||||
|
||||
@@ -6,14 +6,12 @@ package enums
|
||||
type ExternalSource string
|
||||
|
||||
const (
|
||||
ExternalSourceWebChat ExternalSource = "guest"
|
||||
ExternalSourceWechatMP ExternalSource = "wechat_mp"
|
||||
ExternalSourceGuest ExternalSource = "guest"
|
||||
ExternalSourceWxWorkKF ExternalSource = "wxwork_kf"
|
||||
)
|
||||
|
||||
var externalSourceLabelMap = map[ExternalSource]string{
|
||||
ExternalSourceWebChat: "访客",
|
||||
ExternalSourceWechatMP: "微信公众号",
|
||||
ExternalSourceGuest: "访客",
|
||||
ExternalSourceWxWorkKF: "企业微信客服",
|
||||
}
|
||||
|
||||
@@ -27,7 +25,7 @@ func GetExternalSourceLabel(v ExternalSource) string {
|
||||
// IsAllowedOpenImExternalSource 开放 IM 入口允许的外部来源(闭集校验)。
|
||||
func IsAllowedOpenImExternalSource(s ExternalSource) bool {
|
||||
switch s {
|
||||
case ExternalSourceWebChat, ExternalSourceWechatMP:
|
||||
case ExternalSourceGuest:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user