File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,38 @@ The result will be something like:
223223.. image :: /_images/notifier/slack/message-reply.png
224224 :align: center
225225
226+ .. versionadded :: 5.3
227+
228+ The ``threadTs() `` method was introduced in Symfony 5.3.
229+
230+ Updating a Slack Message
231+ ----------------------------------
232+
233+ Save full message id when sending a message::
234+
235+ use Symfony\Component\Notifier\Bridge\Slack\SlackSentMessage;
236+ use Symfony\Component\Notifier\Message\ChatMessage;
237+
238+ $sentMessage = $chatter->send(new ChatMessage('Original message'));
239+
240+ // Make sure that Slack transport was used
241+ if ($sentMessage instanceOf SlackSentMessage) {
242+ $fullMessageId = $sentMessage->getFullMessageId();
243+ }
244+
245+ Use full message id to create
246+ :class: `UpdateMessageSlackOptions ` class::
247+
248+ use Symfony\Component\Notifier\Bridge\Slack\UpdateMessageSlackOptions;
249+ use Symfony\Component\Notifier\Message\ChatMessage;
250+
251+ $options = new UpdateMessageSlackOptions($fullMessageId);
252+ $chatter->send(new ChatMessage('Updated message', $options));
253+
254+ .. versionadded :: 6.2
255+
256+ The ``UpdateMessageSlackOptions `` class was introduced in Symfony 6.2.
257+
226258Adding Interactions to a Discord Message
227259----------------------------------------
228260
You can’t perform that action at this time.
0 commit comments