diff --git a/recipes/hangoutschat/package.json b/recipes/hangoutschat/package.json index 614cf9076..bea0afbaf 100644 --- a/recipes/hangoutschat/package.json +++ b/recipes/hangoutschat/package.json @@ -1,7 +1,7 @@ { "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.7.0", + "version": "1.8.0", "license": "MIT", "aliases": [ "google-chat", diff --git a/recipes/hangoutschat/webview.js b/recipes/hangoutschat/webview.js index 75c53d059..7f2acf2cb 100644 --- a/recipes/hangoutschat/webview.js +++ b/recipes/hangoutschat/webview.js @@ -5,6 +5,15 @@ function _interopRequireDefault(obj) { const _path = _interopRequireDefault(require('path')); module.exports = Ferdium => { + // if the user is on googlechat landing page, go to the login page. + if ( + location.hostname === 'workspace.google.com' && + location.href.includes('products/chat/') + ) { + location.href = + 'https://accounts.google.com/AccountChooser?continue=https://chat.google.com/?referrer=2'; + } + // class corresponding to the red badge that is visible for direct messages const directMessageSelector = 'div.V6.CL.su.ahD.X9.Y2 span.akt span.XU';