mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 01:20:22 +00:00
refactor: deduplicate reply payload helpers
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
projectWarningCollector,
|
||||
} from "openclaw/plugin-sdk/channel-policy";
|
||||
import {
|
||||
attachChannelToResult,
|
||||
createEmptyChannelDirectoryAdapter,
|
||||
createTextPairingAdapter,
|
||||
} from "openclaw/plugin-sdk/channel-runtime";
|
||||
@@ -188,7 +189,7 @@ export function createSynologyChatPlugin() {
|
||||
if (!ok) {
|
||||
throw new Error("Failed to send message to Synology Chat");
|
||||
}
|
||||
return { channel: CHANNEL_ID, messageId: `sc-${Date.now()}`, chatId: to };
|
||||
return attachChannelToResult(CHANNEL_ID, { messageId: `sc-${Date.now()}`, chatId: to });
|
||||
},
|
||||
|
||||
sendMedia: async ({ to, mediaUrl, accountId, cfg }: any) => {
|
||||
@@ -205,7 +206,7 @@ export function createSynologyChatPlugin() {
|
||||
if (!ok) {
|
||||
throw new Error("Failed to send media to Synology Chat");
|
||||
}
|
||||
return { channel: CHANNEL_ID, messageId: `sc-${Date.now()}`, chatId: to };
|
||||
return attachChannelToResult(CHANNEL_ID, { messageId: `sc-${Date.now()}`, chatId: to });
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user