File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/Symfony/Component/Notifier/Bridge/Slack Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ $chatter->send($chatMessage);
200
200
Updating a Slack Message
201
201
------------------------
202
202
203
- First, save the full message ID when sending a message:
203
+ First, save the message ID and channel ID when sending a message:
204
204
205
205
``` php
206
206
use Symfony\Component\Notifier\Bridge\Slack\SlackSentMessage;
@@ -210,18 +210,19 @@ $sentMessage = $chatter->send(new ChatMessage('Original message'));
210
210
211
211
// Make sure that Slack transport was used
212
212
if ($sentMessage instanceOf SlackSentMessage) {
213
- $fullMessageId = $sentMessage->getFullMessageId();
213
+ $messageId = $sentMessage->getMessageId();
214
+ $channelId = $sentMessage->getChannelId();
214
215
}
215
216
```
216
217
217
- Then, use that full message ID to create a new
218
+ Then, use that message ID and channel ID to create a new
218
219
`` UpdateMessageSlackOptions `` class:
219
220
220
221
``` php
221
222
use Symfony\Component\Notifier\Bridge\Slack\UpdateMessageSlackOptions;
222
223
use Symfony\Component\Notifier\Message\ChatMessage;
223
224
224
- $options = new UpdateMessageSlackOptions($fullMessageId );
225
+ $options = new UpdateMessageSlackOptions($channelId, $messageId );
225
226
$chatter->send(new ChatMessage('Updated message', $options));
226
227
```
227
228
You can’t perform that action at this time.
0 commit comments