Skip to content

Commit

Permalink
fix: done with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
conradbekondo committed Jan 14, 2025
1 parent e1f0cea commit 115e752
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions server/handlers/webhooks/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export async function onTelegramUpdate(req: Request, res: Response) {
try {
const { success, data, error } = TelegramBotCommandUpdateSchema.safeParse(req.body);
if (!success) {
console.error(error);
await sendTelegramBotMessage(Number(req.body.message.chat.id), TM_UNKNOWN_COMMAND_MSG);
res.status(204).send();
return;
Expand All @@ -27,8 +26,8 @@ export async function onTelegramUpdate(req: Request, res: Response) {
await handleStartCommand(chat, from);
break;
default:
res.status(404).send('Not found');
return;
await sendTelegramBotMessage(chat.id, TM_UNKNOWN_COMMAND_MSG);
break;
}

res.status(204).send();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<img width="50" src="https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg" alt="telegram logo">
<div class="space-y-1">
<h2 class="font-semibold">Telegram&trade;
<p-tag [rounded]="true" styleClass="capitalize" [severity]="telegramConnectionSeverityText()"
[value]="telegramConnectionStatusText()" styleClass="text-sm" />
</h2>
<div>
<p-tag [rounded]="true" styleClass="capitalize" [severity]="telegramConnectionSeverityText()"
[value]="telegramConnectionStatusText()" styleClass="text-sm" />
</div>
@if(showVerificationCodeInput() && !isTelegramAccountConnected()) {
<div>
<p-input-group>
Expand Down

0 comments on commit 115e752

Please sign in to comment.