up
This commit is contained in:
@@ -551,12 +551,13 @@ class WhatsAppService
|
||||
|
||||
// Si es reply (context)
|
||||
if (isset($data['context']['message_id'])) {
|
||||
$messageData['reply_to_message_id'] = is_numeric($data['context']['message_id']) ? intval($data['context']['message_id']) : null;
|
||||
// WhatsApp message IDs can be alphanumeric (e.g., wamid...), store as string
|
||||
$messageData['reply_to_message_id'] = trim((string)$data['context']['message_id']) ?: null;
|
||||
}
|
||||
|
||||
// Si es reaction
|
||||
if ($data['type'] === 'reaction' && isset($data['reaction'])) {
|
||||
$messageData['reaction_to_message_id'] = is_numeric($data['reaction']['message_id'] ?? null) ? intval($data['reaction']['message_id']) : null;
|
||||
$messageData['reaction_to_message_id'] = isset($data['reaction']['message_id']) ? trim((string)$data['reaction']['message_id']) : null;
|
||||
$messageData['reaction_emoji'] = $data['reaction']['emoji'] ?? null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user