From f98644978e22719751b025311c181fae1ddeb151 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Aug 2018 18:54:43 +0900 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=A7=92=E5=BE=85=E3=81=A4=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/front.ts b/src/front.ts index 71b30f6..5cc89f1 100644 --- a/src/front.ts +++ b/src/front.ts @@ -38,16 +38,18 @@ homeStream.addEventListener('message', message => { if (note.userId == config.id) return; // リアクションする - request.post(`${apiUrl}/notes/reactions/create`, { - json: { - i: config.i, - noteId: note.id, - reaction: 'love' - } - }); + setTimeout(() => { + request.post(`${apiUrl}/notes/reactions/create`, { + json: { + i: config.i, + noteId: note.id, + reaction: 'love' + } + }); + }, 2000); - if (note.text) { - if (note.text.indexOf('リバーシ') > -1) { + if (note.text && note.text.indexOf('リバーシ') > -1) { + setTimeout(() => { request.post(`${apiUrl}/notes/create`, { json: { i: config.i, @@ -57,7 +59,7 @@ homeStream.addEventListener('message', message => { }); invite(note.userId); - } + }, 3000); } }