Skip to content

Commit

Permalink
Ignore everything except new messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinan-96 committed Sep 30, 2024
1 parent f580ce1 commit 1c681cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ app.command("/addcategory", async ({ command, ack, respond }) => {
});

app.event("message", async ({ event, client }) => {
// Check if the message is a reply (i.e., it has a thread_ts field)
if (event.thread_ts || event.bot_id) {
// Ignore replies
// Check if the message is a new message
if (event.subtype) {
// Ignore everything except new messages
return;
}

Expand Down

0 comments on commit 1c681cc

Please sign in to comment.