-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fa6571
commit 1dfdd06
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,18 @@ import { processGroup } from "./src/inputParser.js"; | |
import express from 'express'; | ||
const app = express(); | ||
const port = 3000; | ||
const ggnSouthCityChatId = '[email protected]' | ||
const hydChatId = '[email protected]' | ||
|
||
app.post("/", (req, res) => { | ||
const testGroupChatId = "[email protected]"; | ||
client.sendMessage(testGroupChatId, 'Print List'); | ||
res.send("Hello World!"); | ||
}); | ||
|
||
app.get("/", (req, res) => { | ||
const testGroupChatId = "[email protected]"; | ||
client.sendMessage(testGroupChatId, 'Call api for list'); | ||
client.sendMessage(testGroupChatId, 'Print List'); | ||
res.send("Hello World!"); | ||
}); | ||
|
||
|
@@ -46,6 +54,8 @@ client.initialize(); | |
client.on("message", async (msg) => { | ||
const contact = await msg.getContact(); | ||
const chat = await msg.getChat(); | ||
// Way to get the chat id used. | ||
// console.log(chat.id._serialized); | ||
console.log(contact.number); | ||
let content = msg.body; | ||
if (!content || content === "") { | ||
|