laravel-notification-channels / telegram

✈️ Telegram Notifications Channel for Laravel
https://laravel-notification-channels.com/telegram/
MIT License
964 stars 162 forks source link

Posting in topics #178

Closed nijholt closed 1 year ago

nijholt commented 1 year ago

When posting in topics of channels one has to add the message_thread_id to the payload. Please consider adding this:

public function to(int|string $chatId, int|string|null $threadId = null): self
{
    $this->payload['chat_id'] = $chatId;

    if (empty($threadId) === false) {
        $this-payload['message_thread_id'] = $threadId;
    }

    return $this;
}
irazasyed commented 1 year ago

You can use the options method to add extra params to the payload.

trungpv1601 commented 1 year ago

Thank you. Save my day 🎉