From 50d32d467db17942c69a370f09414c31bb1dbf8b Mon Sep 17 00:00:00 2001 From: Xeltica Date: Thu, 10 Sep 2020 00:57:11 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E6=8A=95=E7=A8=BF=E3=81=99=E3=82=8B=E3=81=A8=E5=85=AC?= =?UTF-8?q?=E9=96=8B=E7=AF=84=E5=9B=B2=E3=81=8C=E3=83=80=E3=82=A4=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=81=AB=E3=81=AA=E3=82=8B=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/worker.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/worker.ts b/src/services/worker.ts index ec76253..a939c2a 100644 --- a/src/services/worker.ts +++ b/src/services/worker.ts @@ -19,15 +19,16 @@ export default (): void => { await updateScore(user); if (user.alertMode === 'note') { + console.info(`send ${user.username}@${user.host}'s misshaialert as a note`); const res = await api>(user.host, 'notes/create', { text, - visibility: 'specified' }, user.token); if (res.error) { throw res.error; } break; } else if (user.alertMode === 'notification') { + console.log(`send ${user.username}@${user.host}'s misshaialert as a notification`); const res = await api(user.host, 'notifications/create', { header: 'みす廃あらーと', icon: 'https://i.imgur.com/B991yTl.png', @@ -36,6 +37,8 @@ export default (): void => { if (res.error) { throw res.error; } + } else { + console.info(`will not send ${user.username}@${user.host}'s misshaialert`); } } catch (e) { if (e.code === 'NO_SUCH_USER' || e.code === 'AUTHENTICATION_FAILED') {