diff --git a/src/browser/index.jsx b/src/browser/index.jsx
index 6d1480a9..90dbb85f 100644
--- a/src/browser/index.jsx
+++ b/src/browser/index.jsx
@@ -72,7 +72,10 @@ var MainPage = React.createClass({
var handleUnreadCountChange = function(count) {
thisObj.handleUnreadCountChange(index, count);
};
- return ()
+ var handleNotificationClick = function() {
+ thisObj.handleSelect(index);
+ }
+ return ()
});
return (
@@ -153,6 +156,8 @@ var MattermostView = React.createClass({
var unreadCount = event.args[0];
thisObj.handleUnreadCountChange(unreadCount);
break;
+ case 'onNotificationClick':
+ thisObj.props.onNotificationClick();
}
});
diff --git a/src/browser/webview/mattermost.js b/src/browser/webview/mattermost.js
index 80543b3a..f56c6526 100644
--- a/src/browser/webview/mattermost.js
+++ b/src/browser/webview/mattermost.js
@@ -53,6 +53,7 @@ function overrideNotification() {
Notification.prototype.__defineSetter__('onclick', function(callback) {
this.notification.onclick = function() {
electron.remote.getCurrentWindow().show();
+ ipc.sendToHost('onNotificationClick');
callback();
};
});