You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message: /get_chat_id@LeadConverterToolkitBot with id 41
Date: 1713342868
Message: Неизвестное действие with id 40
Date: 1713342860
Message: undefined with id 39
Date: 1713342859
Message: Всем привет! Я Гаш - Плевок Тайдхантера with id 38
Date: 1713342536
Message: undefined with id 37
Date: 1713342042
Message: 13 with id 36
Date: 1713178841
Message: 66 with id 35
Date: 1713178819
In the telegram it looks like this:
And now, if I try to get messages using the date 1713342042 (from a message with ID 37), then I will get all messages up to 37, but if I use the date 1713178841 (from a message with ID 36) or less, then I will not get anything in the logs:
async getHistory() {
const telegramClient = await this.getClient();
const messages = await telegramClient.getMessages('-4174797018', {
offsetDate: 1713178841,
});
console.log(messages); // in console: TotalList(0) [ total: 140 ]
// in console: empty
for await (const message of messages) {
console.log('for of message:', message);
}
// in console: empty
messages.forEach((message) => {
console.log(
'\nMessage:',
message.message,
`with id`,
message.id,
'\nDate:',
message.date,
);
});
}
When using telegramClient.iterMessages or maxDate from Api.messages.Search, the same behavior occurs.
The user has the administrator role and the restriction on the visibility of messages to new users in the group has been removed
Is there a way to get messages within a specific time interval, without encountering the restriction on messages visible to the user but sent before their addition?
The text was updated successfully, but these errors were encountered:
I wrote a method for getting messages grom telegram group (didn't check in telegram channel):
And I get in the console:
In the telegram it looks like this:
And now, if I try to get messages using the date 1713342042 (from a message with ID 37), then I will get all messages up to 37, but if I use the date 1713178841 (from a message with ID 36) or less, then I will not get anything in the logs:
When using
telegramClient.iterMessages
or maxDate fromApi.messages.Search
, the same behavior occurs.The user has the administrator role and the restriction on the visibility of messages to new users in the group has been removed
Is there a way to get messages within a specific time interval, without encountering the restriction on messages visible to the user but sent before their addition?
The text was updated successfully, but these errors were encountered: