mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(channel): add wechatoa webhook delivery and proxy config (#356)
Unify webhook handling across channel adapters and add the WeChat Official Account channel so inbound routing and replies work without platform-specific handlers. Add adapter-scoped proxy support and stable config field ordering so restricted network environments can deliver WeChat and Telegram messages reliably.
This commit is contained in:
+3
-1
@@ -37,6 +37,7 @@ import (
|
||||
"github.com/memohai/memoh/internal/channel/adapters/matrix"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/qq"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/telegram"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/wechatoa"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/wecom"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/weixin"
|
||||
"github.com/memohai/memoh/internal/channel/identities"
|
||||
@@ -248,7 +249,7 @@ func runServe() {
|
||||
provideServerHandler(handlers.NewHeartbeatHandler),
|
||||
provideServerHandler(handlers.NewCompactionHandler),
|
||||
provideServerHandler(handlers.NewChannelHandler),
|
||||
provideServerHandler(feishu.NewWebhookServerHandler),
|
||||
provideServerHandler(channel.NewWebhookServerHandler),
|
||||
provideServerHandler(weixin.NewQRServerHandler),
|
||||
provideServerHandler(provideUsersHandler),
|
||||
provideServerHandler(handlers.NewMemoryProvidersHandler),
|
||||
@@ -525,6 +526,7 @@ func provideChannelRegistry(log *slog.Logger, hub *local.RouteHub, mediaService
|
||||
registry.MustRegister(wecom.NewWeComAdapter(log))
|
||||
dingTalkAdapter := dingtalk.NewDingTalkAdapter(log)
|
||||
registry.MustRegister(dingTalkAdapter)
|
||||
registry.MustRegister(wechatoa.NewWeChatOAAdapter(log))
|
||||
weixinAdapter := weixin.NewWeixinAdapter(log)
|
||||
weixinAdapter.SetAssetOpener(mediaService)
|
||||
registry.MustRegister(weixinAdapter)
|
||||
|
||||
+3
-1
@@ -38,6 +38,7 @@ import (
|
||||
"github.com/memohai/memoh/internal/channel/adapters/matrix"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/qq"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/telegram"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/wechatoa"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/wecom"
|
||||
"github.com/memohai/memoh/internal/channel/adapters/weixin"
|
||||
"github.com/memohai/memoh/internal/channel/identities"
|
||||
@@ -172,7 +173,7 @@ func runServe() {
|
||||
provideServerHandler(handlers.NewHeartbeatHandler),
|
||||
provideServerHandler(handlers.NewCompactionHandler),
|
||||
provideServerHandler(handlers.NewChannelHandler),
|
||||
provideServerHandler(feishu.NewWebhookServerHandler),
|
||||
provideServerHandler(channel.NewWebhookServerHandler),
|
||||
provideServerHandler(weixin.NewQRServerHandler),
|
||||
provideServerHandler(provideUsersHandler),
|
||||
provideServerHandler(handlers.NewMemoryProvidersHandler),
|
||||
@@ -447,6 +448,7 @@ func provideChannelRegistry(log *slog.Logger, hub *local.RouteHub, mediaService
|
||||
registry.MustRegister(wecom.NewWeComAdapter(log))
|
||||
dingTalkAdapter := dingtalk.NewDingTalkAdapter(log)
|
||||
registry.MustRegister(dingTalkAdapter)
|
||||
registry.MustRegister(wechatoa.NewWeChatOAAdapter(log))
|
||||
weixinAdapter := weixin.NewWeixinAdapter(log)
|
||||
weixinAdapter.SetAssetOpener(mediaService)
|
||||
registry.MustRegister(weixinAdapter)
|
||||
|
||||
Reference in New Issue
Block a user