这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@alies-dev
Copy link
Collaborator

@alies-dev alies-dev commented May 10, 2024

E.g. for new Dialogs initiated by Cron

Example (from Laravel Event Listener):

final class ReportReadyListener
{
    public function __construct(private readonly DialogManager $dialogManager) {}

    public function handle(ReportReady $reportReady)
    {
        $recipient = $resultsReady->report->requested_user;

        $dialog = new ReportReadyDialog($recipient->telegram_id);

        $this->dialogManager->startNewDialogInitiatedByBot($dialog);
    }

@alies-dev alies-dev self-assigned this May 10, 2024
@alies-dev alies-dev merged commit b901a32 into master May 10, 2024
@alies-dev alies-dev deleted the allow-to-start-dialogs-by-server branch May 10, 2024 19:02
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

Successfully merging this pull request may close these issues.

2 participants