Skip to content

Commit 1c1d0b1

Browse files
committed
Update server.js
1 parent e450d88 commit 1c1d0b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

howtos/how-to-set-an-away-message/server.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ app.post("/talkjs", async (req, res) => {
7272
);
7373

7474
if (outOfOffice && role === "customer") {
75-
if (!(conversationId in autoReplied)) {
75+
if (!(conversationId in alreadyReplied)) {
7676
await sendReply(conversationId);
7777
}
78-
autoReplied[conversationId] = new Date();
78+
alreadyReplied[conversationId] = new Date();
7979
}
8080

81-
if (role === "support" && conversationId in autoReplied) {
82-
delete autoReplied[conversationId];
81+
if (role === "support") {
82+
delete alreadyReplied[conversationId];
8383
}
8484

8585
res.status(200).end();

0 commit comments

Comments
 (0)