From f2c2422eb64113533068f47cfff5af2a9f9d5758 Mon Sep 17 00:00:00 2001 From: OKAMOTO Shigehiro Date: Mon, 27 May 2024 15:51:19 +0900 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=A7=E3=83=97=E3=83=AC?= =?UTF-8?q?=E3=83=93=E3=83=A5=E3=83=BC=E3=81=8C=E7=A2=BA=E8=AA=8D=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=ABSlack=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E3=82=92=E3=83=86=E3=82=AD=E3=82=B9=E3=83=88=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gas/src/main.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/gas/src/main.ts b/gas/src/main.ts index 220e137..69f11ad 100644 --- a/gas/src/main.ts +++ b/gas/src/main.ts @@ -114,23 +114,10 @@ class Webhook { send(from: string, date: Date | GoogleAppsScript.Base.Date, subject: string) { let body = {}; if (this.mode == "Slack") { - const content = `*送信元*: ${from} \n` + `*受信日時*: ${formatDate(date)}\n` + `*件名*: ${subject}`; + const content = [`*件名*: ${subject}`, `*送信元*: ${from}`, `*受信日時*: ${formatDate(date)}`].join("\n"); body = { - attachments: [ - { - color: "#ed6d1f", - blocks: [ - { - type: "section", - text: { - type: "mrkdwn", - text: content, - }, - }, - ], - }, - ], + text: content, }; } else if (this.mode == "Discord") { body = {