summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/PushNotificationService.ts
diff options
context:
space:
mode:
authordojineko <dojineko.spiral@gmail.com>2023-02-22 14:51:34 +0900
committerGitHub <noreply@github.com>2023-02-22 14:51:34 +0900
commita6fb6150a3557245f722ba1c084b0c081e6970e1 (patch)
treedb5976fec72515947f5739249ae8d63a0b28adee /packages/backend/src/core/PushNotificationService.ts
parentfix: MkUserSelectDialog/search-by-username-and-hostでローカルユーザ... (diff)
downloadmisskey-a6fb6150a3557245f722ba1c084b0c081e6970e1.tar.gz
misskey-a6fb6150a3557245f722ba1c084b0c081e6970e1.tar.bz2
misskey-a6fb6150a3557245f722ba1c084b0c081e6970e1.zip
chore: add tiny definition for redis-lock (#9971)
* add tiny definition for redis-lock * Update packages/backend/src/@types/redis-lock.d.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * fix type name * add @typescript-eslint/naming-convention * define taskToPerform type * chore: use default settings for `@typescript-eslint/naming-convention` * set `format:none` to typeParameter (default) * ignore lines to be treated as exceptions * chore: fix naming --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/backend/src/core/PushNotificationService.ts')
-rw-r--r--packages/backend/src/core/PushNotificationService.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts
index 4b7ca5c968..545f86d764 100644
--- a/packages/backend/src/core/PushNotificationService.ts
+++ b/packages/backend/src/core/PushNotificationService.ts
@@ -9,7 +9,7 @@ import { MetaService } from '@/core/MetaService.js';
import { bindThis } from '@/decorators.js';
// Defined also packages/sw/types.ts#L13
-type pushNotificationsTypes = {
+type PushNotificationsTypes = {
'notification': Packed<'Notification'>;
'unreadAntennaNote': {
antenna: { id: string, name: string };
@@ -56,7 +56,7 @@ export class PushNotificationService {
}
@bindThis
- public async pushNotification<T extends keyof pushNotificationsTypes>(userId: string, type: T, body: pushNotificationsTypes[T]) {
+ public async pushNotification<T extends keyof PushNotificationsTypes>(userId: string, type: T, body: PushNotificationsTypes[T]) {
const meta = await this.metaService.fetch();
if (!meta.enableServiceWorker || meta.swPublicKey == null || meta.swPrivateKey == null) return;