We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 044be1e + e20fd2f commit 27771fcCopy full SHA for 27771fc
messenger.rst
@@ -2991,12 +2991,10 @@ Let's say you want to create a message decoder::
2991
{
2992
public function decode(array $encodedEnvelope): Envelope
2993
2994
- $envelope = \json_decode($encodedEnvelope, true);
2995
-
2996
try {
2997
// parse the data you received with your custom fields
2998
- $data = $envelope['data'];
2999
- $data['token'] = $envelope['token'];
+ $data = $encodedEnvelope['data'];
+ $data['token'] = $encodedEnvelope['token'];
3000
3001
// other operations like getting information from stamps
3002
} catch (\Throwable $throwable) {
0 commit comments