diff --git a/src/webhook/handlers/__tests__/__snapshots__/singleUserHandler.test.ts.snap b/src/webhook/handlers/__tests__/__snapshots__/singleUserHandler.test.ts.snap index 82a43b6a..fced6c33 100644 --- a/src/webhook/handlers/__tests__/__snapshots__/singleUserHandler.test.ts.snap +++ b/src/webhook/handlers/__tests__/__snapshots__/singleUserHandler.test.ts.snap @@ -253,19 +253,6 @@ Array [ ], "type": "carousel", }, - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "type": "flex", }, ], diff --git a/src/webhook/handlers/__tests__/singleUserHandler.test.ts b/src/webhook/handlers/__tests__/singleUserHandler.test.ts index 9ded1d22..792ac0d9 100644 --- a/src/webhook/handlers/__tests__/singleUserHandler.test.ts +++ b/src/webhook/handlers/__tests__/singleUserHandler.test.ts @@ -231,19 +231,6 @@ it('handles postbacks w/ LegacyContext', async () => { Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "Postback results here", "type": "text", }, @@ -288,19 +275,6 @@ it('rejects outdated postback events', async () => { Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "🚧 You are currently searching for another message, buttons from previous search sessions do not work now.", "type": "text", }, @@ -380,19 +354,6 @@ it('forwards to CHOOSING_ARTICLE when VIEW_ARTICLE_PREFIX is sent', async () => Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "Choosing article resp", "type": "text", }, @@ -452,19 +413,6 @@ it('shows reply list when article URL is sent', async () => { Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "Choosing article resp", "type": "text", }, @@ -545,19 +493,6 @@ it('Resets session on free-form input, triggers fast-forward', async () => { Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "Replies here", "type": "text", }, @@ -614,19 +549,6 @@ it('handles tutorial trigger from rich menu', async () => { Object { "messages": Array [ Object { - "quickReply": Object { - "items": Array [ - Object { - "action": Object { - "label": "來謠言惑眾獎投票吧!", - "type": "uri", - "uri": "https://www.mygopen.com/p/award_22.html", - }, - "imageUrl": "/static/img/mygopen-award-2024.png?cachebust=1", - "type": "action", - }, - ], - }, "text": "Tutorial here", "type": "text", }, diff --git a/src/webhook/handlers/singleUserHandler.ts b/src/webhook/handlers/singleUserHandler.ts index 65d4c6d7..ec310bc5 100644 --- a/src/webhook/handlers/singleUserHandler.ts +++ b/src/webhook/handlers/singleUserHandler.ts @@ -140,24 +140,6 @@ const singleUserHandler = async ( }) ); - // Attach MyGoPen award as quick reply - const lastReply = result.replies[result.replies.length - 1]; - if (!lastReply.quickReply) { - lastReply.quickReply = { - items: [ - { - type: 'action', - imageUrl: `${process.env.RUMORS_LINE_BOT_URL}/static/img/mygopen-award-2024.png?cachebust=1`, - action: { - type: 'uri', - uri: 'https://www.mygopen.com/p/award_22.html', - label: '來謠言惑眾獎投票吧!', - }, - }, - ], - }; - } - // Send replies. Does not need to wait for lineClient's callbacks. // lineClient's callback does error handling by itself. // diff --git a/static/img/mygopen-award-2024.png b/static/img/mygopen-award-2024.png deleted file mode 100644 index ae8560eb..00000000 Binary files a/static/img/mygopen-award-2024.png and /dev/null differ