chore: update channel url (#13)

This commit is contained in:
paisley
2026-02-09 17:27:13 +08:00
committed by GitHub
Unverified
parent 05b5874832
commit 41b6868646
2 changed files with 31 additions and 21 deletions

View File

@@ -179,11 +179,21 @@ export const useChannelsStore = create<ChannelsState>((set, get) => ({
}, },
deleteChannel: async (channelId) => { deleteChannel: async (channelId) => {
// Extract channel type from the channelId (format: "channelType-accountId")
const channelType = channelId.split('-')[0];
try {
// Delete the channel configuration from openclaw.json
await window.electron.ipcRenderer.invoke('channel:deleteConfig', channelType);
} catch (error) {
console.error('Failed to delete channel config:', error);
}
try { try {
await window.electron.ipcRenderer.invoke( await window.electron.ipcRenderer.invoke(
'gateway:rpc', 'gateway:rpc',
'channels.delete', 'channels.delete',
{ channelId } { channelId: channelType }
); );
} catch (error) { } catch (error) {
// Continue with local deletion even if gateway fails // Continue with local deletion even if gateway fails

View File

@@ -144,7 +144,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
icon: '🎮', icon: '🎮',
description: 'Connect Discord using a bot token from Developer Portal', description: 'Connect Discord using a bot token from Developer Portal',
connectionType: 'token', connectionType: 'token',
docsUrl: 'https://docs.openclaw.ai/channels/discord', docsUrl: 'https://docs.openclaw.ai/channels/discord#how-to-create-your-own-bot',
configFields: [ configFields: [
{ {
key: 'token', key: 'token',
@@ -255,7 +255,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
icon: '🐦', icon: '🐦',
description: 'Connect Feishu/Lark bot via WebSocket', description: 'Connect Feishu/Lark bot via WebSocket',
connectionType: 'token', connectionType: 'token',
docsUrl: 'https://docs.openclaw.ai/channels/feishu', docsUrl: 'https://docs.openclaw.ai/channels/feishu#step-1-create-a-feishu-app',
configFields: [ configFields: [
{ {
key: 'appId', key: 'appId',