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

Handling message twice #1560

Open
pavelpage opened this issue Oct 2, 2024 · 0 comments
Open

Handling message twice #1560

pavelpage opened this issue Oct 2, 2024 · 0 comments

Comments

@pavelpage
Copy link

    #[Handler]
    public function handleMessage(Incoming&Message $message): void
    {
        if (in_array($message->chatId, $this->notifiedChatIds)) {
           $this->service->storeNewMessage($message);
        }
    
    }

If I'm using this code, sometimes it stores the same message twice. Is it normal or not? Because, I cannot check why it handles the same message twice.
Of course, I can check the $message->id to prevent such kind of behaviour, but I want to understand, why does it happen.

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