Skip to content

Commit

Permalink
20240116
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin committed Jan 16, 2024
1 parent e41c9da commit 355739b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: 安裝 Node.js 與 yarn
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: 安裝 Node.js 與 yarn
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
Expand Down
2 changes: 1 addition & 1 deletion line/handler/replyFlexFromText.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = async (ctx, next) => {
let msg = parseJsonOrDefault(_.get(ctx, 'event.message.text'))
if (!_.isArray(msg) && !_.isPlainObject(msg)) return await next() // 轉交給下一個 middleware 處理

if (_.has(msg, 'replyToken')) { // 有 replyToken 代表使用者可能是把剛剛傳送的事件複製貼上
if (_.has(msg, 'replyToken') || _.has(msg, 'events.0.replyToken')) { // 有 replyToken 代表使用者可能是把剛剛傳送的事件複製貼上
return await ctx.replyMessage(msgText('感謝你傳訊息給我,但因為這個訊息疑似是 Messaging API 中傳送給 Webhook 的事件,所以我不知道該怎麼處理它。\n\n如果你是開發者,請參考相關文件: https://developers.line.biz/en/reference/messaging-api/#message-event'))
}

Expand Down

0 comments on commit 355739b

Please sign in to comment.