Skip to content

Commit 4f2ed0c

Browse files
committed
feature symfony#61444 [Notifier][Telegram] Add TelegramOptions::messageThreadId() (MKC-MKC)
This PR was squashed before being merged into the 7.4 branch. Discussion ---------- [Notifier][Telegram] Add TelegramOptions::messageThreadId() | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | symfony#61443 | License | MIT --- Telegram has long supported `thread` based messages. This PR adds an option to enable that support. Use this method like this: ```php $options = new TelegramOptions() ->messageThreadId($_ENV["YOU_THREAD_ID_HERE"]) // <== LIKE THIS ->parseMode(TelegramOptions::PARSE_MODE_HTML); ``` Commits ------- 5437d9e [Notifier][Telegram] Add TelegramOptions::messageThreadId()
2 parents aa08fbe + 5437d9e commit 4f2ed0c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Telegram/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.4
5+
---
6+
7+
* Add support for `messageThreadId` option in `TelegramOptions`
8+
49
6.4
510
---
611

src/Symfony/Component/Notifier/Bridge/Telegram/TelegramOptions.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function chatId(string $id): static
4848
return $this;
4949
}
5050

51+
/**
52+
* @return $this
53+
*/
54+
public function messageThreadId(int $threadId): static
55+
{
56+
$this->options['message_thread_id'] = $threadId;
57+
58+
return $this;
59+
}
60+
5161
/**
5262
* @return $this
5363
*/

0 commit comments

Comments
 (0)