Исправлен порядок обработки ping в notification-manager
- Ping проверяется ДО логирования - Убрано предупреждение 'Unknown message type: ping'
This commit is contained in:
parent
a2ceba626c
commit
6ca8bf6602
@ -129,13 +129,15 @@ class NotificationManager {
|
||||
handleMessage(event) {
|
||||
try {
|
||||
const data = JSON.parse(event.data);
|
||||
|
||||
// Игнорируем ping сообщения для keepalive (не логируем)
|
||||
if (data.type === 'ping') {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[Notifications] Received:', data);
|
||||
|
||||
switch (data.type) {
|
||||
case 'ping':
|
||||
// Игнорируем ping сообщения для keepalive
|
||||
return;
|
||||
|
||||
case 'unread_count':
|
||||
this.updateBadge(data.count);
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user