up
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
try {
|
||||
$db = Database::getInstance();
|
||||
$mid = 'wamid.TEST' . rand(1000,9999);
|
||||
$db->insert('conversations', [
|
||||
'user_id' => 2,
|
||||
'message_id' => $mid,
|
||||
'direction' => 'incoming',
|
||||
'message_type' => 'document',
|
||||
'content' => 'usuarios_blancos.csv',
|
||||
'media_url' => 'https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1379066300634610&source=webhook&ext=1769010393&hash=EXAMPLE',
|
||||
'status' => 'received'
|
||||
]);
|
||||
$row = $db->fetch('SELECT * FROM conversations WHERE message_id = ?', [$mid]);
|
||||
echo json_encode($row, JSON_PRETTY_PRINT) . "\n";
|
||||
} catch (Throwable $t) {
|
||||
echo 'Error: ' . $t->getMessage() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user