SHA256
Добавить предпросмотр DM в push-уведомлениях
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getDmPreviewDiagnostics } from '../services/dm-preview-settings.js';
|
||||
import { formatDateTime, formatTime } from '../i18n/format.js';
|
||||
import { t, th } from '../i18n/index.js';
|
||||
import { createTopBar } from '../components/topbar.js';
|
||||
@@ -256,6 +257,7 @@ async function collectDiagnostics() {
|
||||
lastTestPushCode: result.lastTestPushCode,
|
||||
lastTestPushAtMs: result.lastTestPushAtMs,
|
||||
lastPushPayload: result.lastPushPayload,
|
||||
dmPreviewLastAttempt: await getDmPreviewDiagnostics(),
|
||||
};
|
||||
|
||||
return result;
|
||||
@@ -442,7 +444,7 @@ export function render({navigate, chrome}) {
|
||||
return;
|
||||
}
|
||||
|
||||
const registration = await navigator.serviceWorker.register('./firebase-messaging-sw.js');
|
||||
const registration = await navigator.serviceWorker.register('./firebase-messaging-sw.js', { type: 'module', updateViaCache: 'none' });
|
||||
let permission = String(Notification.permission || 'default');
|
||||
if (permission !== 'granted') {
|
||||
permission = await Notification.requestPermission();
|
||||
|
||||
Reference in New Issue
Block a user