feat: add WeChat MP channel support and enhance widget configuration
- Updated output path for generated enums to reflect new structure. - Enhanced ChannelController to handle WeChat MP OAuth authorization and callback. - Introduced WechatMPChannelConfig DTO for WeChat MP specific configurations. - Modified WidgetConfigResponse to include channel type and external source. - Added enums for WeChat MP channel type and external source. - Implemented OAuth flow for WeChat MP, including state signing and verification. - Updated frontend forms to accommodate WeChat MP configurations. - Enhanced API interactions to support WeChat MP external ID and source. - Updated generated enums to include WeChat MP external source.
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
import { summarizeIMMessage } from "@/lib/im-message"
|
||||
import { createRealtimeConnectionManager } from "@/lib/realtime-connection"
|
||||
import { generateUUID } from "@/lib/utils"
|
||||
import { readKefuWidgetConfig, setKefuWidgetConfig } from "@/lib/kefu-widget-config"
|
||||
|
||||
type ChatStatus = "connecting" | "connected" | "disconnected"
|
||||
|
||||
@@ -267,6 +268,15 @@ export const useKefuChatStore = create<KefuChatStore>((set, get) => {
|
||||
return
|
||||
}
|
||||
|
||||
if (widgetConfig.channelId || widgetConfig.externalSource) {
|
||||
setKefuWidgetConfig({
|
||||
...readKefuWidgetConfig(),
|
||||
channelId: widgetConfig.channelId || readKefuWidgetConfig().channelId,
|
||||
externalSource:
|
||||
widgetConfig.externalSource || readKefuWidgetConfig().externalSource,
|
||||
})
|
||||
}
|
||||
|
||||
set({
|
||||
title: widgetConfig.title || "在线客服",
|
||||
subtitle: widgetConfig.subtitle || "",
|
||||
|
||||
Reference in New Issue
Block a user