Skip to content

Commit 7756e73

Browse files
committed
Document TelegramMessage::escapeMarkdown
1 parent 6743ee7 commit 7756e73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class InvoicePaid extends Notification
169169
->content("Hello there!")
170170
->line("Your invoice has been *PAID*")
171171
->lineIf($notifiable->amount > 0, "Amount paid: {$notifiable->amount}")
172-
->line("Thank you!")
172+
->line(sprintf("Thank you, ".TelegramMessage::escapeMarkdown("$user->name!"))
173173

174174
// (Optional) Blade template for the content.
175175
// ->view('notification', ['url' => $url])
@@ -525,6 +525,10 @@ For more information on supported parameters, check out these [docs](https://cor
525525
> [!NOTE]
526526
> Chunked messages will be rate limited to one message per second to comply with rate limitation requirements from Telegram.
527527
528+
#### Helper Methods:
529+
530+
- `escapeMarkdown(string $content)` - Escape a string to make it safe for the `markdownv2` parse mode
531+
528532
### Telegram Location Methods
529533

530534
> Telegram location messages are used to share a geographical location with the user.

0 commit comments

Comments
 (0)