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

[2.x] Add Telegram notifications support #192

Merged
merged 2 commits into from
May 18, 2020
Merged

Conversation

snake03
Copy link
Contributor

@snake03 snake03 commented May 17, 2020

Added support for Telegram notifications using in your Envoy.blade.php:

@finished
    @telegram('<bot-id>','<chat-id>', '<message = null>', '<options = []>')
@endfinished

You should have a proper <bot-id>, the id of the bot you're using to send messages. You can get one using an existing Telegram Bot or creating a new one using BotFather.
Take a look at Telegram Docs for additional information about Bot ids.

You should also use a valid <chat-id>, which is the id of the chat you want to send notifications. You can use the id of your own Telegram account if you want to send messages to yourself through the Bot, or you can use the id of a Telegram group (in which the Bot is invited / present).
You can retrieve the id of your account or of a group in various way: a quick one is using @username_to_id_bot

The message and options params are optional.
Using message you can overwrite Envoy default message for a successful task.
Using options you can send additional params to Telegram Api.

Resolve Issue: #191

Sending to 2.x branch because I consider it a fully backward compatible minor feature.

Hope this can be useful. Thanks!

@driesvints driesvints changed the title Add Telegram notifications support [2.x] Add Telegram notifications support May 18, 2020
src/Telegram.php Outdated Show resolved Hide resolved
@taylorotwell taylorotwell merged commit 4a111aa into laravel:2.x May 18, 2020
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.

3 participants