Skip to content

Commit 3a50c15

Browse files
authored
fix: update telegram consumer (#117)
* fix: update telegram consumer * fix: fix type (#118)
1 parent b0d5aaa commit 3a50c15

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

apps/telegram/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async function onNewMessage(channel: Channel, msg: ConsumeMessage) {
9393
try {
9494
if (telegramSubscriptions.length > 0) {
9595
// Send the message to all subscribers
96-
for (const { chat_id: chatId } of telegramSubscriptions) {
96+
for (const { chatId } of telegramSubscriptions) {
9797
console.debug(
9898
`[telegram:main] Sending message ${id} to chatId ${chatId}`
9999
);

libs/cms-api/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ type Schemas = components['schemas'];
55
export type CmsNotification = Schemas['NotificationListResponseDataItem'];
66
export type CmsNotificationResponse = Schemas['NotificationListResponse'];
77
export type CmsTelegramSubscription = {
8-
id: number;
98
account: string;
10-
chat_id: string;
9+
chatId: string;
1110
};
1211
export type CmsTelegramSubscriptionsResponse =
1312
Schemas['TelegramSubscriptionResponse'];

0 commit comments

Comments
 (0)