From defbb416480905af2150d1c92f10d8e1d1288c0a Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 21 Sep 2021 03:05:23 +0900 Subject: [PATCH] remove follow action --- locales/ja-JP.yml | 1 - src/client/sw/create-notification.ts | 10 ---------- src/client/sw/sw.ts | 3 --- 3 files changed, 14 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index a3d516b631..0dacaa6929 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1709,7 +1709,6 @@ _notification: app: "連携アプリからの通知" _actions: - followBack: "フォローバック" reply: "返信" renote: "Renote" diff --git a/src/client/sw/create-notification.ts b/src/client/sw/create-notification.ts index 1ec684df8b..a22932588f 100644 --- a/src/client/sw/create-notification.ts +++ b/src/client/sw/create-notification.ts @@ -38,20 +38,10 @@ async function composeNotification(data case 'notification': switch (data.body.type) { case 'follow': - // users/showの型定義をswos.apiへ当てはめるのが困難なのでapiFetch.requestを直接使用 - const account = await getAccountFromId(data.userId); - if (!account) return null; - const userDetail = apiFetch.request('users/show', { userId: data.body.userId }, account.token); return [t('_notification.youWereFollowed'), { body: getUserName(data.body.user), icon: data.body.user.avatarUrl, data, - actions: userDetail.isFollowing ? [] : [ - { - action: 'follow', - title: t('_notification._actions.followBack') - } - ], }]; case 'mention': diff --git a/src/client/sw/sw.ts b/src/client/sw/sw.ts index 162502959f..abb2b20683 100644 --- a/src/client/sw/sw.ts +++ b/src/client/sw/sw.ts @@ -108,9 +108,6 @@ self.addEventListener('notificationclick',