Skip to content

Commit 546d661

Browse files
committed
Go back to ephmeral messages
1 parent 1c681cc commit 546d661

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/server.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ app.command("/addcategory", async ({ command, ack, respond }) => {
5555

5656
app.event("message", async ({ event, client }) => {
5757
// Check if the message is a new message
58-
if (event.subtype) {
58+
if (event.subtype || (event.thread_ts && event.thread_ts !== event.ts)) {
5959
// Ignore everything except new messages
6060
return;
6161
}
@@ -65,8 +65,9 @@ app.event("message", async ({ event, client }) => {
6565

6666
try {
6767
// Respond with an ephemeral message containing a dropdown menu
68-
await client.chat.postMessage({
68+
await client.chat.postEphemeral({
6969
channel: event.channel, // The channel where the message was posted
70+
user: event.user, // The user who triggered the event
7071
text: `Hello, <@${event.user}>! Please choose a category:`,
7172
blocks: [
7273
{

0 commit comments

Comments
 (0)