Skip to content

Commit dde6a8d

Browse files
committed
fix: some new TG subscriptions have IDs instead of names
1 parent 0140c93 commit dde6a8d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/aigency-backend/src/grabbers/telegram/telegram.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export class TelegramService {
5555
if (!telegramEntry) return;
5656
const { client, dialogs } = telegramEntry;
5757
if (!client || !dialogs) return;
58-
const messages = await getMessages({ client, dialogs, channelName });
58+
const messages = await getMessages({
59+
client,
60+
dialogs,
61+
channelName,
62+
isNew: true,
63+
});
5964
return messages;
6065
} catch (error) {
6166
console.log(error);

apps/aigency-backend/src/subscription/subscription.service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ export class SubscriptionService {
7575
}
7676
}
7777

78-
// console.log(channelName);
79-
8078
const subscription = this.subscriptionRepository.create({
8179
userId,
8280
source,
@@ -85,7 +83,6 @@ export class SubscriptionService {
8583
lastSeenPostTimestamp: timestamp ?? null,
8684
isByFinder,
8785
});
88-
// console.log(subscription);
8986

9087
await this.subscriptionRepository.insert(subscription);
9188

0 commit comments

Comments
 (0)