mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 04:00:24 +00:00
refactor: dedupe channel plugin shared assembly
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
collectAllowlistProviderGroupPolicyWarnings,
|
||||
collectOpenGroupPolicyRouteAllowlistWarnings,
|
||||
} from "openclaw/plugin-sdk/channel-policy";
|
||||
import { createChannelPluginBase } from "openclaw/plugin-sdk/core";
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
@@ -96,7 +97,7 @@ export function createWhatsAppPluginBase(params: {
|
||||
| "setup"
|
||||
| "groups"
|
||||
> {
|
||||
return {
|
||||
return createChannelPluginBase({
|
||||
id: WHATSAPP_CHANNEL,
|
||||
meta: {
|
||||
...getChatChannelMeta(WHATSAPP_CHANNEL),
|
||||
@@ -218,5 +219,18 @@ export function createWhatsAppPluginBase(params: {
|
||||
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
|
||||
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint,
|
||||
},
|
||||
};
|
||||
}) as Pick<
|
||||
ChannelPlugin<ResolvedWhatsAppAccount>,
|
||||
| "id"
|
||||
| "meta"
|
||||
| "setupWizard"
|
||||
| "capabilities"
|
||||
| "reload"
|
||||
| "gatewayMethods"
|
||||
| "configSchema"
|
||||
| "config"
|
||||
| "security"
|
||||
| "setup"
|
||||
| "groups"
|
||||
>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user