feat(im): add WeChat integration with QR code login and long-polling support
- Extended the IMChannel interface to include WeChat as a platform, supporting long-polling mode and full output mode. - Implemented WeChat QR code login functionality, allowing users to authenticate via a QR code. - Added new API endpoints for generating and polling the status of WeChat QR codes. - Updated the frontend to handle WeChat-specific UI elements and interactions, including dynamic form adjustments based on the selected platform. - Enhanced localization files to include WeChat-related translations. - Introduced a WeChat adapter for message handling and file downloading via the iLink Bot API.
This commit is contained in:
@@ -641,6 +641,13 @@ func RegisterIMChannelRoutes(r *gin.RouterGroup, imHandler *handler.IMHandler) {
|
||||
channels.DELETE("/:id", imHandler.DeleteIMChannel)
|
||||
channels.POST("/:id/toggle", imHandler.ToggleIMChannel)
|
||||
}
|
||||
|
||||
// WeChat QR code login (requires authentication)
|
||||
wechatGroup := r.Group("/wechat")
|
||||
{
|
||||
wechatGroup.POST("/qrcode", imHandler.WeChatGetQRCode)
|
||||
wechatGroup.POST("/qrcode/status", imHandler.WeChatPollQRCodeStatus)
|
||||
}
|
||||
}
|
||||
|
||||
// serveFrontendStatic registers a middleware that serves the frontend SPA
|
||||
|
||||
Reference in New Issue
Block a user