这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/DialogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ public function activate(Dialog $dialog): void
$this->storeDialogState($dialog);
}

/**
* @api Remove current active Dialog from a Storage.
*/
public function forgetActiveDialog(Update $update): void
{
$dialog = $this->getDialogInstance($update);
if ($dialog instanceof Dialog) {
$this->forgetDialogState($dialog);
}
}

/**
* Initiate a new Dialog from server side (e.g. by cron).
* Note, a User firstly should start a chat with a bot (bot can't initiate a chat — this is TG Bot API limitation).
Expand Down