Rollback push
This commit is contained in:
parent
38f9cf920e
commit
822fc8e13e
@ -11,12 +11,12 @@ import '../mtproto/mtproto.worker';
|
|||||||
import type { WorkerTaskTemplate, WorkerTaskVoidTemplate } from '../../types';
|
import type { WorkerTaskTemplate, WorkerTaskVoidTemplate } from '../../types';
|
||||||
import type { InputFileLocation, UploadFile } from '../../layer';
|
import type { InputFileLocation, UploadFile } from '../../layer';
|
||||||
import type { WebPushApiManager } from '../mtproto/webPushApiManager';
|
import type { WebPushApiManager } from '../mtproto/webPushApiManager';
|
||||||
|
import type { PushNotificationObject } from './push';
|
||||||
import { logger, LogTypes } from '../logger';
|
import { logger, LogTypes } from '../logger';
|
||||||
import { CancellablePromise } from '../../helpers/cancellablePromise';
|
import { CancellablePromise } from '../../helpers/cancellablePromise';
|
||||||
import './push';
|
|
||||||
import { CACHE_ASSETS_NAME, requestCache } from './cache';
|
import { CACHE_ASSETS_NAME, requestCache } from './cache';
|
||||||
import onStreamFetch from './stream';
|
import onStreamFetch from './stream';
|
||||||
import { closeAllNotifications, onPing, PushNotificationObject } from './push';
|
// import { closeAllNotifications, onPing } from './push';
|
||||||
|
|
||||||
export const log = logger('SW', LogTypes.Error | LogTypes.Debug | LogTypes.Log | LogTypes.Warn);
|
export const log = logger('SW', LogTypes.Error | LogTypes.Debug | LogTypes.Log | LogTypes.Warn);
|
||||||
const ctx = self as any as ServiceWorkerGlobalScope;
|
const ctx = self as any as ServiceWorkerGlobalScope;
|
||||||
@ -62,10 +62,10 @@ const taskListeners: {
|
|||||||
[type in ServiceWorkerTask['type']]: (task: any, event: ExtendableMessageEvent) => void
|
[type in ServiceWorkerTask['type']]: (task: any, event: ExtendableMessageEvent) => void
|
||||||
} = {
|
} = {
|
||||||
notifications_clear: () => {
|
notifications_clear: () => {
|
||||||
closeAllNotifications();
|
// closeAllNotifications();
|
||||||
},
|
},
|
||||||
ping: (task: ServiceWorkerPingTask, event) => {
|
ping: (task: ServiceWorkerPingTask, event) => {
|
||||||
onPing(task, event);
|
// onPing(task, event);
|
||||||
},
|
},
|
||||||
requestFilePart: (task: RequestFilePartTaskResponse) => {
|
requestFilePart: (task: RequestFilePartTaskResponse) => {
|
||||||
const promise = deferredPromises[task.id];
|
const promise = deferredPromises[task.id];
|
||||||
|
Loading…
Reference in New Issue
Block a user