Skip to content

Commit

Permalink
check widgetId in case of multiple reels
Browse files Browse the repository at this point in the history
  • Loading branch information
stCarolas committed May 22, 2024
1 parent e881690 commit d7b3db3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/Reel/ReelWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export default function ReelWidget({}) {
subscribe(widgetId, conf.topic.reel, (message) => {
log.info({ message: message }, "Received reel command");
let json = JSON.parse(message.body);
handleSelection(json.selection);
if (json.widgetId === widgetId ) {
handleSelection(json.selection);
}
message.ack();
});
setupCommandListener(widgetId, () => navigate(0));
Expand Down

0 comments on commit d7b3db3

Please sign in to comment.