mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-20 13:41:30 +00:00
Channels: expose shared interactive support checks
This commit is contained in:
@@ -34,6 +34,10 @@ export function supportsChannelMessageButtons(cfg: OpenClawConfig): boolean {
|
||||
return supportsMessageFeature(cfg, (actions) => actions?.supportsButtons?.({ cfg }) === true);
|
||||
}
|
||||
|
||||
export function supportsChannelMessageInteractive(cfg: OpenClawConfig): boolean {
|
||||
return supportsMessageFeature(cfg, (actions) => actions?.supportsInteractive?.({ cfg }) === true);
|
||||
}
|
||||
|
||||
export function supportsChannelMessageButtonsForChannel(params: {
|
||||
cfg: OpenClawConfig;
|
||||
channel?: string;
|
||||
@@ -44,6 +48,16 @@ export function supportsChannelMessageButtonsForChannel(params: {
|
||||
);
|
||||
}
|
||||
|
||||
export function supportsChannelMessageInteractiveForChannel(params: {
|
||||
cfg: OpenClawConfig;
|
||||
channel?: string;
|
||||
}): boolean {
|
||||
return supportsMessageFeatureForChannel(
|
||||
params,
|
||||
(actions) => actions.supportsInteractive?.(params) === true,
|
||||
);
|
||||
}
|
||||
|
||||
export function supportsChannelMessageCards(cfg: OpenClawConfig): boolean {
|
||||
return supportsMessageFeature(cfg, (actions) => actions?.supportsCards?.({ cfg }) === true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user