Skip to content

Commit 33fcf11

Browse files
committed
Stop encoding text to generate unique dropdown identifier, use timestamp instead
1 parent 92b4334 commit 33fcf11

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/server.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ app.event("message", async ({ event, client }) => {
5959
// Ignore everything except new messages
6060
return;
6161
}
62-
63-
const encodedText = btoa(event.text);
6462
console.log("Posting an ephemeral message to user:", event.user, "in channel:", event.channel);
65-
6663
try {
6764
// Respond with an ephemeral message containing a dropdown menu
6865
await client.chat.postEphemeral({
@@ -78,7 +75,7 @@ app.event("message", async ({ event, client }) => {
7875
},
7976
accessory: {
8077
type: "external_select",
81-
action_id: `category_select-${encodedText}`,
78+
action_id: `category_select-${event.ts}`,
8279
placeholder: {
8380
type: "plain_text",
8481
text: "Select a category",

0 commit comments

Comments
 (0)