A replacement prpl for Google Chat in Pidgin/libpurple to support the proprietary protocol that Google uses for its "Google Chat" service.
This plugin is written by Eion Robb based on the old Hangouts plugin written by Eion Robb and Mike 'Maiku' Ruprecht.
To compile, just do the standard make && sudo make install
dance. You'll need development packages for libpurple, libjson-glib, glib and libprotobuf-c to be able to compile.
Run the following commands from a terminal
#!sh
sudo apt-get install -y libpurple-dev libjson-glib-dev libglib2.0-dev libprotobuf-c-dev protobuf-c-compiler git make;
git clone https://github.com/EionRobb/purple-googlechat/ && cd purple-googlechat;
make && sudo make install
json-glib-devel libpurple-devel glib2-devel libpurple-devel protobuf-c-devel protobuf-c-compiler
Builds of Windows dll's are here - copy this into your C:\Program Files (x86)\Pidgin\plugins folder. You'll also need libprotobuf-c-1.dll and libjson-glib-1.0.dll in your C:\Program Files (x86)\Pidgin folder (not the plugins subfolder)
Until there's some kind of helper/installer, you might want to copy in the protocol icons into the pixmaps folder, eg copy github.com/EionRobb/purple-googlechat/googlechat16.png to C:\Program Files (x86)\Pidgin\pixmaps\pidgin\protocols\16\googlechat.png (and the same for the 22 and 48 png files)
The plugin uses cookies from a logged in browser to authenticate
- Open https://chat.google.com/ in a private/incognito browser window and log in normally
- Press F12 to open developer tools.
- Select the "Application" (Chrome) or "Storage" (Firefox) tab.
- In the sidebar, expand "Cookies" and select https://chat.google.com.
- In the cookie list, find the COMPASS, SSID, SID, OSID and HSID rows.
- When using Firefox, you may have multiple COMPASS cookies with different paths. Pick the one where path is /.
- Paste the value of each cookie into the 'Advanced' tab of the account:
- Close the browser window to prevent the cookies being invalidated
There's also a handy extension mautrix/googlechat#93 (comment)
- Firefox: addons.mozilla.org/en-US/firefox/addon/gchat-login-cookie-generator and
- Chromium based browsers: chrome.google.com/webstore/detail/matrix-gchat-bridge-login/mofmfbkepponmdchhamalbcldoajbmho
You may also need to use a fresh "Guest Profile" in Chrome if the above doesn't work
Grab the cookie values as above, then set them with
account <account id> set COMPASS_token <value>
account <account id> set SSID_token <value>
account <account id> set SID_token <value>
account <account id> set OSID_token <value>
account <account id> set HSID_token <value>
Set the password on the account manually in the format
COMPASS=<value>&SSID=<value>&SID=<value>&OSID=<value>&HSID=<value>
(making sure not to encode =
in the value as %3D
)
Say "Thanks" by buying me a coffee