From 8fa55baf98d9371904c5f214ad3e8f2e10c278ab Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 12 Nov 2021 10:08:55 +0900 Subject: [PATCH] merge --- packages/client/src/scripts/get-user-name.ts | 3 +++ packages/client/src/sw/sw.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 packages/client/src/scripts/get-user-name.ts diff --git a/packages/client/src/scripts/get-user-name.ts b/packages/client/src/scripts/get-user-name.ts new file mode 100644 index 0000000000..d499ea0203 --- /dev/null +++ b/packages/client/src/scripts/get-user-name.ts @@ -0,0 +1,3 @@ +export default function(user: { name?: string | null, username: string }): string { + return user.name || user.username; +} diff --git a/packages/client/src/sw/sw.ts b/packages/client/src/sw/sw.ts index 9f31a439a8..ea3a60568d 100644 --- a/packages/client/src/sw/sw.ts +++ b/packages/client/src/sw/sw.ts @@ -8,7 +8,7 @@ import { swLang } from '@/sw/lang'; import { swNotificationRead } from '@/sw/notification-read'; import { pushNotificationDataMap } from '@/sw/types'; import * as swos from './operations'; -import { getAcct } from '@/scripts/acct'; +import { acct as getAcct } from '@/filters/user'; //#region Lifecycle: Install self.addEventListener('install', ev => {