Feat/telegram#314
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Someone is attempting to deploy a commit to the Sim Studio Team on Vercel. A member of the Team first needs to authorize it. |
|
Deployment failed with the following error: |
| // For Telegram, provide more specific error messages | ||
| if (webhookProvider === 'telegram') { | ||
| const errorMessage = data.message || data.error || 'Webhook test failed' | ||
| if (errorMessage.includes('SSL')) { |
There was a problem hiding this comment.
Brittle error detection using string matching
| airtableBaseId, | ||
| airtableTableId, | ||
| airtableIncludeCellValues, | ||
| telegramBotToken, |
There was a problem hiding this comment.
Sensitive data stored in component state
| text: string | ||
| } | ||
|
|
||
| export interface TelegramMessageResponse extends ToolResponse { |
There was a problem hiding this comment.
Inconsistent indentation. This interface has 2 extra spaces compared to the TelegramMessageParams interface above it.
| botToken: string | ||
| chatId: string | ||
| text: string | ||
| } |
There was a problem hiding this comment.
Missing newline at end of file which is a common coding standard.
| @@ -0,0 +1,120 @@ | |||
| import React, { useEffect } from 'react' | |||
There was a problem hiding this comment.
The useEffect hook is imported but never used in the component
| } | ||
| }) | ||
|
|
||
| const responseBody = await telegramResponse.json() |
There was a problem hiding this comment.
Missing error handling for json parsing which could throw if response is not valid JSON
| import { ToolConfig } from '../types' | ||
| import { TelegramMessageParams, TelegramMessageResponse } from './types' | ||
|
|
||
| export const telegramMessageTool: ToolConfig<TelegramMessageParams, TelegramMessageResponse> = { |
There was a problem hiding this comment.
The return type TelegramMessageResponse doesn't match the actual return structure in transformResponse
| ) | ||
| } | ||
|
|
||
| export function TelegramIcon(props: SVGProps<SVGSVGElement>) { |
There was a problem hiding this comment.
The TelegramIcon component is missing accessibility attributes
| return ( | ||
| <svg | ||
| {...props} | ||
| width="40" |
There was a problem hiding this comment.
Hardcoded width and height values may cause inconsistency with other icons
| const [discordAvatarUrl, setDiscordAvatarUrl] = useState('') | ||
| const [slackSigningSecret, setSlackSigningSecret] = useState('') | ||
|
|
||
| const [telegramBotToken, setTelegramBotToken] = useState('') |
There was a problem hiding this comment.
Rule violated: Prevent Default Empty Values for Required Security Parameters
Security parameter 'telegramBotToken' is initialized with an empty string default
…ioai#314) * jira and confluence token refresh * telegram message tool * webhook configured * telegram requires permanent url * webhook working * telegram done * test * telegram webhook working * package-lock.json * style curl command * added setWebhook logic * added some documentation for chat ID * styling changes * added delete webhook logic * adding docs * updated docs for jira and telegram * added links * moved function to other route.ts * logger * mrge.io changes --------- Co-authored-by: Adam Gough <adamgough@Adams-MacBook-Pro.local>
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes #242
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
I created my own telegram bot, tested the send message tool by having the bot send a message to me using the chat ID and bot token. For the Webhook, I configured the Webhook using the bot token and trigger phrase, sent my bot the trigger phrase message, and saw that the workflow executed by reviewing the logs. I created clear instructions in the Webhook instruction for users to follow. Configuring the Telegram API with the chatID is the more reliable than using the @username for Telegram.
Checklist:
npm test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.