up
This commit is contained in:
@@ -260,3 +260,22 @@
|
||||
[2026-01-28 02:00:25] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 02:00:26] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769583926&hash=ARkwnC8kELAgDSp4Qy8qvU3cY6trphM71K08Ebb3rQDeXg
|
||||
[2026-01-28 02:00:26] Proxying Facebook media URL with Authorization to https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1217156256734654&source=getMedia&ext=1769583926&hash=ARk42Fz7IB5FhjLHoVW-GF05cM0WjbFZU0NerKLOUo1W9g
|
||||
[2026-01-28 03:18:05] Request: GET /api/version/media-url.php?id=1217156256734654 GET:{"id":"1217156256734654"} POST:[]
|
||||
[2026-01-28 03:18:05] Graph API request to https://graph.facebook.com/v22.0/1217156256734654
|
||||
[2026-01-28 03:18:05] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 03:18:05] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769588585&hash=ARkVdjFC3Uu5nQJZXmE5lLktOjWCcPMYzZ61SBauirv_aw
|
||||
[2026-01-28 03:18:05] Proxying Facebook media URL with Authorization to https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1217156256734654&source=getMedia&ext=1769588585&hash=ARla4Pa4QEwiV_oieDGmCCLXztCpuE7Lw54OCd4KYs38ww
|
||||
[2026-01-28 03:18:36] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 03:18:36] Request: GET /api/version/media-url.php?id=1217156256734654 GET:{"id":"1217156256734654"} POST:[]
|
||||
[2026-01-28 03:18:37] Graph API request to https://graph.facebook.com/v22.0/1217156256734654
|
||||
[2026-01-28 03:18:37] Proxying Facebook media URL with Authorization to https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1217156256734654&source=getMedia&ext=1769588617&hash=ARlovSN0qil5sm9qyn2ShTZx9yQntDv12lgRO4QcpzurUg
|
||||
[2026-01-28 03:18:37] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769588617&hash=ARle3IQo63hp1ka0RQJj8T1d5z4NaBDD0eSWOtbjUjJvbg
|
||||
[2026-01-28 03:18:43] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 03:18:43] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769588623&hash=ARn5LfU3xlBS_GsoBGqmCBbPH-eRU_EhsN4IcbCbsfna2w
|
||||
[2026-01-28 03:18:56] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 03:18:56] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769588636&hash=ARmrR9Bm2eEnJVO6QBtfv7EHt6LDV7rJ82xjq9tb_t41OA
|
||||
[2026-01-28 03:19:02] Request: GET /api/version/media-url.php?id=1217156256734654 GET:{"id":"1217156256734654"} POST:[]
|
||||
[2026-01-28 03:19:02] Graph API request to https://graph.facebook.com/v22.0/1217156256734654
|
||||
[2026-01-28 03:19:02] Request: GET /api/version/media-url.php?url=https%3A%2F%2Flookaside.fbsbx.com%2Fwhatsapp_business%2Fattachments%2F%3Fmid%3D2371342336638440%26source%3Dwebhook%26ext%3D1769575796%26hash%3DARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA GET:{"url":"https:\/\/lookaside.fbsbx.com\/whatsapp_business\/attachments\/?mid=2371342336638440&source=webhook&ext=1769575796&hash=ARndVKdw1p0CCx3_DpTblR2aOVkb_W5mbTqGFPSOK77cjA"} POST:[]
|
||||
[2026-01-28 03:19:02] Proxying Facebook media URL with Authorization to https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=1217156256734654&source=getMedia&ext=1769588642&hash=ARkCJbkmByU2tdLOv2EHpSH0F12MJjM_Oqj-hiGgNVSYAg
|
||||
[2026-01-28 03:19:02] Resolved media URL from Graph for mid 2371342336638440: https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2371342336638440&source=getMedia&ext=1769588642&hash=ARl75SVpu4vAnsH1AXoBGSv5sjftMr7JPocagoN5kIdMWQ
|
||||
|
||||
+30
-8
@@ -889,6 +889,8 @@ if (!isset($_SESSION['user_id'])) {
|
||||
<div id="bot-toggle-container" style="display:flex;align-items:center;gap:6px;margin-right:8px;">
|
||||
<button class="btn btn-sm btn-outline-secondary" id="bot-toggle">Bot: On</button>
|
||||
</div>
|
||||
<!-- Botón actualizar mensajes -->
|
||||
<button class="btn btn-sm btn-outline-light" id="refresh-messages-btn" title="Actualizar mensajes"><i class="fas fa-sync-alt"></i></button>
|
||||
<!-- PWA install button for conversations view -->
|
||||
<button id="pwa-install-btn" class="btn btn-sm btn-outline-primary d-none" style="display:none;">Instalar</button>
|
||||
<button class="btn btn-sm btn-outline-secondary" id="mark-unread-btn" title="Marcar conversación como no leída" style="display:none;">Marcar no leído</button>
|
||||
@@ -1774,6 +1776,25 @@ if (!isset($_SESSION['user_id'])) {
|
||||
this.sendMessage();
|
||||
});
|
||||
|
||||
// Botón actualizar mensajes
|
||||
const refreshBtn = document.getElementById('refresh-messages-btn');
|
||||
if (refreshBtn) {
|
||||
refreshBtn.addEventListener('click', async () => {
|
||||
if (!this.currentUserId) return;
|
||||
refreshBtn.disabled = true;
|
||||
refreshBtn.innerHTML = '<i class="fas fa-sync-alt fa-spin"></i>';
|
||||
try {
|
||||
await this.loadMessages(this.currentUserId, true, true);
|
||||
console.log('✅ Mensajes actualizados manualmente');
|
||||
} catch (e) {
|
||||
console.error('Error actualizando mensajes:', e);
|
||||
} finally {
|
||||
refreshBtn.disabled = false;
|
||||
refreshBtn.innerHTML = '<i class="fas fa-sync-alt"></i>';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Forward handler: open preview when user chooses to forward an existing message
|
||||
this.forwardMessage = function(messageId) {
|
||||
try {
|
||||
@@ -2778,10 +2799,16 @@ if (!isset($_SESSION['user_id'])) {
|
||||
}
|
||||
const json = await resp.json();
|
||||
if (json && json.success) {
|
||||
// SSE actualizará las conversaciones automáticamente
|
||||
// await this.loadConversations();
|
||||
alert('Conversación marcada como NO leída.');
|
||||
// Actualizar la conversación local para mostrar badge de no leído
|
||||
const conv = this.conversations.find(c => String(c.user_id) === String(userId));
|
||||
if (conv) {
|
||||
conv.unread_count = Math.max(1, conv.unread_count || 1);
|
||||
}
|
||||
// Refrescar la lista visual
|
||||
this.renderConversations();
|
||||
console.log('✅ Conversación marcada como no leída');
|
||||
} else {
|
||||
console.error('Error marcando conversación como no leída:', json);
|
||||
alert('Error marcando conversación como no leída');
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -5246,10 +5273,5 @@ if (!isset($_SESSION['user_id'])) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer U-Site -->
|
||||
<footer style="position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); padding: 8px 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.7); z-index: 999; border-top: 1px solid rgba(255,255,255,0.1);">
|
||||
Desarrollado con 💚 por <a href="https://u-site.app" target="_blank" style="color: #25d366; text-decoration: none; font-weight: 600;">U-Site.app</a>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user