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 => {