Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch_up doesnt fetch posts. #4569

Open
3 tasks done
julius425 opened this issue Mar 3, 2025 · 0 comments
Open
3 tasks done

catch_up doesnt fetch posts. #4569

julius425 opened this issue Mar 3, 2025 · 0 comments

Comments

@julius425
Copy link

Code that causes the issue

I have problem with my bot doesnt see first posted messages if i add bot before i post something (with catch_up=True).

        # bot class implementation above
        await self.client.start(bot_token=self.bot_token)
        
        state = await self.client(GetStateRequest())
        logger.info(f"Current update state: {state}")
        
        await self.client.catch_up()
``

and 

```python
    TelegramClient(
            session=session,
            api_id=api_id,
            api_hash=api_hash,
            catch_up=True,
        )

Expected behavior

-create new channel,
-add bot,
-post a message.
-trying to fetch - new posts fetched.

Actual behavior

-create new channel,
-add bot,
-post a message.
-trying to fetch - no new posts fetched.
-post message,
-fetches ok.

If i fetched empty channel with bot in it before posting somthing to it (to sync session) nothing fetches as well

-create new channel,
-post something,
-add bot,
-post again
-new posts are fetched without problems.

Is this an expected behavior?

Traceback

Update state is the same in both success fetched and failed to fetch wariants
Current update state: State(pts=1, qts=0, date=datetime.datetime(2025, 3, 3, 8, 40, 6, tzinfo=datetime.timezone.utc), seq=1, unread_count=0)

Telethon version

1.36.0

Python version

3.11.11

Operating system (including distribution name and version)

macOS 15.3.1

Other details

No response

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant