Skip to content

Commit e20fd2f

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: docs: encodedEnvelope is already an array
2 parents 5f11bec + ba6f65d commit e20fd2f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

messenger.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,12 +2965,10 @@ Let's say you want to create a message decoder::
29652965
{
29662966
public function decode(array $encodedEnvelope): Envelope
29672967
{
2968-
$envelope = \json_decode($encodedEnvelope, true);
2969-
29702968
try {
29712969
// parse the data you received with your custom fields
2972-
$data = $envelope['data'];
2973-
$data['token'] = $envelope['token'];
2970+
$data = $encodedEnvelope['data'];
2971+
$data['token'] = $encodedEnvelope['token'];
29742972

29752973
// other operations like getting information from stamps
29762974
} catch (\Throwable $throwable) {

0 commit comments

Comments
 (0)