Skip to content

Commit

Permalink
only notify current web page
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Mar 10, 2020
1 parent e92b910 commit 078d13a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/Views/BrowserTab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,11 @@ export class BrowserTab extends PureComponent {

notifyAllConnections = (payload, restricted = true) => {
const { privacyMode, approvedHosts } = this.props;
const { fullHostname } = this.state;

// TODO:permissions move permissioning logic elsewhere
this.backgroundBridges.forEach(bridge => {
if (!privacyMode || !restricted || approvedHosts[bridge.hostname]) {
if (bridge.hostname === fullHostname && (!privacyMode || !restricted || approvedHosts[bridge.hostname])) {
bridge.sendNotification(payload);
}
});
Expand Down

0 comments on commit 078d13a

Please sign in to comment.