fix renderAcct -> getAcct

This commit is contained in:
tamaina 2021-07-17 22:00:48 +09:00
parent cfeef658f7
commit e07e7dba29
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
declare var self: ServiceWorkerGlobalScope; declare var self: ServiceWorkerGlobalScope;
import { SwMessage, swMessageOrderType } from './types'; import { SwMessage, swMessageOrderType } from './types';
import renderAcct from '@/misc/acct/render'; import { getAcct } from '@/misc/acct';
import { getAccountFromId } from '@client/scripts/get-account-from-id'; import { getAccountFromId } from '@client/scripts/get-account-from-id';
import { appendLoginId } from '@client/scripts/login-id'; import { appendLoginId } from '@client/scripts/login-id';
@ -41,7 +41,7 @@ export function openNote(noteId: string, loginId: string) {
export async function openChat(body: any, loginId: string) { export async function openChat(body: any, loginId: string) {
if (body.groupId === null) { if (body.groupId === null) {
return openClient('push', `/my/messaging/${renderAcct(body.user)}`, loginId, { body }); return openClient('push', `/my/messaging/${getAcct(body.user)}`, loginId, { body });
} else { } else {
return openClient('push', `/my/messaging/group/${body.groupId}`, loginId, { body }); return openClient('push', `/my/messaging/group/${body.groupId}`, loginId, { body });
} }

View File

@ -8,7 +8,7 @@ import { swLang } from '@client/sw/lang';
import { swNotificationRead } from '@client/sw/notification-read'; import { swNotificationRead } from '@client/sw/notification-read';
import { pushNotificationData } from '@/types'; import { pushNotificationData } from '@/types';
import * as ope from './operations'; import * as ope from './operations';
import renderAcct from '@/misc/acct/render'; import { getAcct } from '@/misc/acct';
//#region Lifecycle: Install //#region Lifecycle: Install
self.addEventListener('install', ev => { self.addEventListener('install', ev => {
@ -121,7 +121,7 @@ self.addEventListener('notificationclick', ev => {
client = await ope.api('following/create', id, { userId: body.userId }); client = await ope.api('following/create', id, { userId: body.userId });
break; break;
case 'showUser': case 'showUser':
client = await ope.openUser(renderAcct(body.user), id); client = await ope.openUser(getAcct(body.user), id);
if (body.type !== 'renote') close = false; if (body.type !== 'renote') close = false;
break; break;
case 'reply': case 'reply':
@ -169,7 +169,7 @@ self.addEventListener('notificationclick', ev => {
break; break;
} }
if ('user' in body) { if ('user' in body) {
client = await ope.openUser(renderAcct(body.data.user), id); client = await ope.openUser(getAcct(body.data.user), id);
break; break;
} }
} }