Skip to content

Commit c1e12a9

Browse files
committed
Update CHANGELOG and README.
1 parent e6aabbd commit c1e12a9

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to `telegram` will be documented in this file
44

5+
## 0.5.0 - 2020-09-08
6+
7+
- Add previous `ClientException` when constructing `CouldNotSendNotification` exception. PR [#86](https://github.com/laravel-notification-channels/telegram/pull/86).
8+
- Add Laravel 8 Support. PR [#88](https://github.com/laravel-notification-channels/telegram/pull/88).
9+
- Add Bot token per notification support. Closed [#84](https://github.com/laravel-notification-channels/telegram/issues/84).
10+
- Add view file support for notification content. Closed [#82](https://github.com/laravel-notification-channels/telegram/issues/82).
11+
- Add support to set HTTP Client.
12+
513
## 0.4.1 - 2020-07-07
614

715
- Add Guzzle 7 Support. PR [#80](https://github.com/laravel-notification-channels/telegram/pull/80).

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ class InvoicePaid extends Notification
8989
->to($notifiable->telegram_user_id)
9090
// Markdown supported.
9191
->content("Hello there!\nYour invoice has been *PAID*")
92+
93+
// (Optional) Blade template for the content.
94+
// ->view('notification', ['url' => $url])
95+
9296
// (Optional) Inline Buttons
9397
->button('View Invoice', $url)
9498
->button('Download Invoice', $url);
@@ -219,24 +223,29 @@ Notification::route('telegram', 'TELEGRAM_CHAT_ID')
219223
### Available Message methods
220224

221225
- `to($chatId)`: (integer) Recipient's chat id.
226+
- `token($token)`: (string) Bot token if you wish to override the default token for a specific notification (optional).
222227
- `content('')`: (string) Notification message, supports markdown. For more information on supported markdown styles, check out these [docs](https://telegram-bot-sdk.readme.io/reference#section-formatting-options).
223-
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want and they'll be placed 2 in a row.
228+
- `view($view, $data = [], $mergeData = [])`: (string) Blade template name with Telegram supported HTML or Markdown syntax content if you wish to use a view file instead of the `content()` method.
229+
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want, and they'll be placed 2 in a row.
224230
- `disableNotification($disableNotification = true)`: (bool) Send the message silently. Users will receive a notification with no sound.
225231
- `options([])`: (array) Allows you to add additional or override `sendMessage` payload (A Telegram Bot API method used to send message internally). For more information on supported parameters, check out these [docs](https://telegram-bot-sdk.readme.io/docs/sendmessage).
226232

227233
### Available Location methods
228234

229235
- `to($chatId)`: (integer) Recipient's chat id.
236+
- `token($token)`: (string) Bot token if you wish to override the default token for a specific notification (optional).
230237
- `latitude($latitude)`: (float|string) Latitude of the location.
231238
- `longitude($longitude)`: (float|string) Longitude of the location.
232-
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want and they'll be placed 2 in a row.
239+
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want, and they'll be placed 2 in a row.
233240
- `disableNotification($disableNotification = true)`: (bool) Send the message silently. Users will receive a notification with no sound.
234241
- `options([])`: (array) Allows you to add additional or override the payload.
235242

236243
### Available File methods
237244

238245
- `to($chatId)`: (integer) Recipient's chat id.
246+
- `token($token)`: (string) Bot token if you wish to override the default token for a specific notification (optional).
239247
- `content('')`: (string) File caption, supports markdown. For more information on supported markdown styles, check out these [docs](https://telegram-bot-sdk.readme.io/reference#section-formatting-options).
248+
- `view($view, $data = [], $mergeData = [])`: (string) Blade template name with Telegram supported HTML or Markdown syntax content if you wish to use a view file instead of the `content()` method.
240249
- `file($file, $type, $filename = null)`: Local file path or remote URL, `$type` of the file (Ex:`photo`, `audio`, `document`, `video`, `animation`, `voice`, `video_note_`) and optionally filename with extension. Ex: `sample.pdf`. You can use helper methods instead of using this to make it easier to work with file attachment.
241250
- `photo($file)`: Helper method to attach a photo.
242251
- `audio($file)`: Helper method to attach an audio file (MP3 file).
@@ -245,7 +254,7 @@ Notification::route('telegram', 'TELEGRAM_CHAT_ID')
245254
- `animation($file)`: Helper method to attach an animated gif file.
246255
- `voice($file)`: Helper method to attach a voice note (`.ogg` file with OPUS encoded).
247256
- `videoNote($file)`: Helper method to attach a video note file (Upto 1 min long, rounded square video).
248-
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want and they'll be placed 2 in a row.
257+
- `button($text, $url)`: (string) Adds an inline "Call to Action" button. You can add as many as you want, and they'll be placed 2 in a row.
249258
- `disableNotification($disableNotification = true)`: (bool) Send the message silently. Users will receive a notification with no sound.
250259
- `options([])`: (array) Allows you to add additional or override the payload.
251260

0 commit comments

Comments
 (0)