remove the telegram and whatsapp channels, reduce discord to notifications
All three existed to drive the platform from a chat app. The phone app does that now, so they are dead weight — three bot gateways, three command parsers, account pairing, admin config screens and bot tokens sitting in the database. Gone entirely: telegram/ and whatsapp/, discord/'s bot and command handler, the shared channel plumbing they were the only users of (pairing.ts, send-and-await.ts, types.ts, routes.ts and its 20 config/pairing/status endpoints), the six settings components, and their sections in the integrations screen. What Discord keeps is the one piece worth keeping — pushing a message out — as notify/discord.ts, configured by DISCORD_WEBHOOK_URL in the env. No UI, no pairing, no stored credential, and it never throws: a notification that fails to send is logged and dropped. Unset means notifications are silently skipped, which is the default state. Kept deliberately: send-claude-code.ts and send-opencode.ts. They live under channels/ but have nothing to do with chat apps — they are how /chat and the pipeline executor drive an agent turn. Also drops four dependencies with no remaining importer (discord.js, node-telegram-bot-api, whatsapp-web.js, qrcode), and the /sync-now route added to the email sidecar an hour ago, whose only consumer was the channel handlers. The "Channel Models" settings section stays, with its description corrected — it is keyed off the general access policy rather than anything channel-specific, so it governs non-owner accounts, not chat apps. Whether that whole class still earns its place is the open question already noted against origin-validation. Not touched: the telegram, whatsapp and discord rows in server_integrations, which still hold their bot tokens. Deleting rows is a different kind of decision and the SQL is in the handover. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useMemo } from 'react';
|
||||
import { Puzzle, KeyRound, UserCircle, MessageCircle, Globe, Wrench, Mail } from 'lucide-react';
|
||||
import { Puzzle, KeyRound, UserCircle, Globe, Wrench, Mail } from 'lucide-react';
|
||||
import type { LayoutNode, PanelComponents } from 'officerdev';
|
||||
import { WorkspaceLayout } from 'officerdev';
|
||||
import { useAuth } from 'hooks/useAuth';
|
||||
@@ -9,12 +9,6 @@ import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import { SettingsSidebar, SettingsContent, type SettingsSection } from '../SettingsPanel';
|
||||
import { GoogleOAuthConfig } from './GoogleOAuthConfig';
|
||||
// import { GoogleAccount } from './GoogleAccount'; // hidden — email uses IMAP app password now
|
||||
import { DiscordBotConfig } from './DiscordBotConfig';
|
||||
import { DiscordAccount } from './DiscordAccount';
|
||||
import { TelegramBotConfig } from './TelegramBotConfig';
|
||||
import { TelegramAccount } from './TelegramAccount';
|
||||
import { WhatsAppBotConfig } from './WhatsAppBotConfig';
|
||||
import { WhatsAppAccount } from './WhatsAppAccount';
|
||||
import { BrowserRelay } from './BrowserRelay';
|
||||
import { ApifyConfig } from './ApifyConfig';
|
||||
import { EmailAccounts } from './EmailAccounts';
|
||||
@@ -30,27 +24,6 @@ const enterpriseSections: SettingsSection[] = [
|
||||
description: 'Client ID and secret for Google APIs',
|
||||
content: <GoogleOAuthConfig />,
|
||||
},
|
||||
{
|
||||
key: 'discord-bot',
|
||||
icon: MessageCircle,
|
||||
title: 'Discord Bot',
|
||||
description: 'Bot token for Discord integration',
|
||||
content: <DiscordBotConfig />,
|
||||
},
|
||||
{
|
||||
key: 'telegram-bot',
|
||||
icon: MessageCircle,
|
||||
title: 'Telegram Bot',
|
||||
description: 'Bot token for Telegram integration',
|
||||
content: <TelegramBotConfig />,
|
||||
},
|
||||
{
|
||||
key: 'whatsapp-bot',
|
||||
icon: MessageCircle,
|
||||
title: 'WhatsApp',
|
||||
description: 'WhatsApp Web connection',
|
||||
content: <WhatsAppBotConfig />,
|
||||
},
|
||||
{
|
||||
key: 'apify',
|
||||
icon: Wrench,
|
||||
@@ -77,27 +50,6 @@ const personalSections: SettingsSection[] = [
|
||||
// description: 'Connect your Google account',
|
||||
// content: <GoogleAccount />,
|
||||
// },
|
||||
{
|
||||
key: 'discord-account',
|
||||
icon: MessageCircle,
|
||||
title: 'Discord',
|
||||
description: 'Link your Discord account',
|
||||
content: <DiscordAccount />,
|
||||
},
|
||||
{
|
||||
key: 'telegram-account',
|
||||
icon: MessageCircle,
|
||||
title: 'Telegram',
|
||||
description: 'Link your Telegram account',
|
||||
content: <TelegramAccount />,
|
||||
},
|
||||
{
|
||||
key: 'whatsapp-account',
|
||||
icon: MessageCircle,
|
||||
title: 'WhatsApp',
|
||||
description: 'Link your WhatsApp account',
|
||||
content: <WhatsAppAccount />,
|
||||
},
|
||||
{
|
||||
key: 'browser-relay',
|
||||
icon: Globe,
|
||||
|
||||
Reference in New Issue
Block a user