feat: implement Phase 1 LINE Message Integration (Order Created, Payment Confirmed, Shipped, Cancelled)

This commit is contained in:
Your Name committed 2026-06-13 00:23:21 -04:00
1 parent 852d9c1925
commit 59363616c4
4 files changed
+630 -34

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@ const webhookHandler = async ({ request, body, set }: { request: Request, body:
try {
const parsedBody = typeof body === 'string' ? JSON.parse(body) : body;
const events: line.WebhookEvent[] = parsedBody.events || [];
const events: line.webhook.Event[] = parsedBody.events || [];
for (const event of events) {
if (event.type === 'message' && event.message.type === 'text') {
@@ -48,7 +48,7 @@ const webhookHandler = async ({ request, body, set }: { request: Request, body:
// Simple echo bot for now
await lineClient.replyMessage({
replyToken: event.replyToken,
replyToken: event.replyToken!,
messages: [{
type: 'text',
text: `คุณส่งข้อความว่า: ${event.message.text}`