chore: update channel url (#13)
This commit is contained in:
committed by
GitHub
Unverified
parent
05b5874832
commit
41b6868646
@@ -179,11 +179,21 @@ export const useChannelsStore = create<ChannelsState>((set, get) => ({
|
||||
},
|
||||
|
||||
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 {
|
||||
await window.electron.ipcRenderer.invoke(
|
||||
'gateway:rpc',
|
||||
'channels.delete',
|
||||
{ channelId }
|
||||
{ channelId: channelType }
|
||||
);
|
||||
} catch (error) {
|
||||
// Continue with local deletion even if gateway fails
|
||||
|
||||
@@ -144,7 +144,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
icon: '🎮',
|
||||
description: 'Connect Discord using a bot token from Developer Portal',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/discord',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/discord#how-to-create-your-own-bot',
|
||||
configFields: [
|
||||
{
|
||||
key: 'token',
|
||||
@@ -255,7 +255,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
icon: '🐦',
|
||||
description: 'Connect Feishu/Lark bot via WebSocket',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/feishu',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/feishu#step-1-create-a-feishu-app',
|
||||
configFields: [
|
||||
{
|
||||
key: 'appId',
|
||||
|
||||
Reference in New Issue
Block a user