Merge branch 'develop' into pr/ThatOneCalculator/8764
This commit is contained in:
commit
6fab21c6a7
233 changed files with 6639 additions and 18111 deletions
|
@ -42,8 +42,12 @@ self.addEventListener('push', ev => {
|
|||
// case 'driveFileCreated':
|
||||
case 'notification':
|
||||
case 'unreadMessagingMessage':
|
||||
// 1日以上経過している場合は無視
|
||||
if ((new Date()).getTime() - data.dateTime > 1000 * 60 * 60 * 24) break;
|
||||
|
||||
// クライアントがあったらストリームに接続しているということなので通知しない
|
||||
if (clients.length != 0) return;
|
||||
if (clients.length !== 0) break;
|
||||
|
||||
return createNotification(data);
|
||||
case 'readAllNotifications':
|
||||
for (const n of await self.registration.getNotifications()) {
|
||||
|
|
|
@ -24,6 +24,7 @@ export type pushNotificationData<K extends keyof pushNotificationDataSourceMap>
|
|||
type: K;
|
||||
body: pushNotificationDataSourceMap[K];
|
||||
userId: string;
|
||||
dateTime: number;
|
||||
};
|
||||
|
||||
export type pushNotificationDataMap = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue