Skip to content

Commit

Permalink
Merge pull request #24 from tawn33y/feature/ISSUE-22
Browse files Browse the repository at this point in the history
Feature/issue-22 Add context to message when available
  • Loading branch information
tawn33y committed Aug 16, 2022
2 parents dd73985 + 5b6d92f commit f0bc280
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/startExpressServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,20 @@ export const startExpressServer = (
event = rest.interactive.type;
data = {
...(rest.interactive.list_reply || rest.interactive.button_reply),
context: rest.context,
};
break;

default:
break;
}

if (rest.context) {
data = {
...data,
context: rest.context,
};
}

if (event && data) {
['message', event].forEach((e) => PubSub.publish(e, {
from,
Expand Down

0 comments on commit f0bc280

Please sign in to comment.