From 2b483ef0cbe5c6db2955b0631c06bee0d047ab8a Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 10 Dec 2025 17:10:05 -0400 Subject: [PATCH] Fix event_message body always empty (#7660) Message body was not checked. This will update the get and set methods to ensure if the body is present the body can be set and retrieved. --- app/active_calls/resources/classes/event_message.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/active_calls/resources/classes/event_message.php b/app/active_calls/resources/classes/event_message.php index fcd67a30d4..d619ba288e 100644 --- a/app/active_calls/resources/classes/event_message.php +++ b/app/active_calls/resources/classes/event_message.php @@ -92,6 +92,10 @@ class event_message implements filterable_payload { // Use the filter chain to ensure the key is allowed if ($this->event_filter === null || ($this->event_filter)($name, $value)) { + if ($name === self::BODY_ARRAY_KEY) { + $this->body = $value; + return; + } $this->event[$name] = $value; } } @@ -104,6 +108,9 @@ class event_message implements filterable_payload { public function __get(string $name) { self::sanitize_event_key($name); if ($name === 'name') $name = 'event_name'; + if ($name === self::BODY_ARRAY_KEY) { + return $this->body; + } return $this->event[$name] ?? ''; }