From cd0ef674650f3211c80066499bbc85278c9f65fa Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Fri, 2 Jul 2021 14:02:46 -0400 Subject: [PATCH] Update docs --- LIMITATIONS.md | 28 ++++++++++++++++++++++++++++ README.md | 9 ++++++--- ROADMAP.md | 36 ++++-------------------------------- SETUP.md | 13 ++++++++----- puppet/.gitignore | 1 + puppet/README.md | 4 ++-- 6 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 LIMITATIONS.md diff --git a/LIMITATIONS.md b/LIMITATIONS.md new file mode 100644 index 0000000..a80a5cc --- /dev/null +++ b/LIMITATIONS.md @@ -0,0 +1,28 @@ +# Limitations & missing features +Not all features of LINE are supported by the LINE Chrome extension on which this bridge relies, and not all Matrix features are available in LINE. This section documents all known features missing from LINE that this bridge cannot provide. + +## Missing from LINE +* Typing notifications +* Message edits +* Formatted messages +* Presence +* Timestamped read receipts +* Read receipts between users other than yourself +* Identity of who read a message in a multi-user chat + +## Missing from LINE on Chrome +* Unlimited message history + * Messages that are very old may not be available in LINE on Chrome at all, even after a full sync +* Voice/video calls + * No notification is sent when a call begins + * When a call ends, an automated message of "Your OS version doesn't support this feature" is sent as an ordinary text message from the user who began the call +* Message redaction (delete/unsend) + * But messages unsent from other LINE clients do disappear from LINE on Chrome +* Replies + * Appear as ordinary messages +* Mentions + * Appear as ordinary text +* Audio message sending + * But audio messages can be received +* Location sending + * But locations can be received diff --git a/README.md b/README.md index f58912d..f496f98 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ # matrix-puppeteer-line -A very hacky Matrix-LINE bridge based on running LINE's Chrome extension in Puppeteer. -Fork of [https://mau.dev/tulir/mautrix-amp/](mautrix-amp). +A Matrix-LINE puppeting bridge based on running LINE's Chrome extension in [Puppeteer](https://github.com/puppeteer/puppeteer). +Fork of [mautrix-amp](https://mau.dev/tulir/mautrix-amp/). -## Features, roadmap, and limitations +## Features & roadmap [ROADMAP.md](ROADMAP.md) +## Limitations & missing features +[LIMITATIONS.md](LIMITATIONS.md) + ## Setup [SETUP.md](SETUP.md) diff --git a/ROADMAP.md b/ROADMAP.md index fa1f41a..dba2e07 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -6,7 +6,7 @@ * [x] Images * [ ] Files * [x] Stickers - * [ ] Read receipts (currently eagerly-sent since message sync requires "reading" a chat) + * [x] Read receipts[1] * [ ] Room metadata changes * [ ] Name * [ ] Avatar @@ -24,9 +24,7 @@ * [x] Stickers * [x] Emoji * [ ] Message unsend - * [ ] Read receipts - * [x] For most recently active chat - * [ ] For any chat + * [x] Read receipts[2] * [x] User metadata * [ ] Name * [x] On sync @@ -77,31 +75,5 @@ * [ ] Multiple bridge users * [ ] Relay bridging -# Missing features -## Missing from LINE -* Typing notifications -* Message edits -* Formatted messages -* Presence -* Timestamped read receipts -* Read receipts between users other than yourself - -## Missing from LINE on Chrome -* Unlimited message history - * Messages that are very old may not be available in LINE on Chrome at all, even after a full sync -* Voice/video calls - * No notification is sent when a call begins - * When a call ends, an automated message of "Your OS version doesn't support this feature" is sent as an ordinary text message from the user who began the call -* Message redaction (delete/unsend) - * But messages unsent from other LINE clients do disappear from LINE on Chrome -* Replies - * Appear as ordinary messages -* Mentions - * Appear as ordinary text -* Audio message sending - * But audio messages can be received -* Location sending - * But locations can be received - -## Missing from matrix-puppeteer-line -* TODO +[1] Requires [MSC2409](https://github.com/matrix-org/matrix-doc/pull/2409). Without it, the bridge will always view incoming LINE messages on your behalf. +[2] LINE read receipts may be bridged later than they actually occur. The more unread chats there are, the longer this delay will be. diff --git a/SETUP.md b/SETUP.md index 590252b..6f49913 100644 --- a/SETUP.md +++ b/SETUP.md @@ -1,14 +1,17 @@ # Minimum Requirements * Python 3.8 * Node 10.18.1 -* xdotool +* yarn 1.22.x + +# Optional Requirements +* `xdotool` - required for reliably running the Puppeteer module headless in a background X server. See [puppet/README.md](puppet/README.md) # Initial setup ## Puppeteer module -1. Download the .crx file of the [LINE Chrome extension](https://chrome.google.com/webstore/detail/line/ophjlpahpchlmihnnnihgmmeilfjmjjc) (current version: 2.4.4) - * The recommended way of doing this is with the [CRX Extractor/Downloader](https://chrome.google.com/webstore/detail/crx-extractordownloader/ajkhmmldknmfjnmeedkbkkojgobmljda) extension for Chrome/Chromium. Simply install that extension in a Chrome/Chromium instance of your choice, then navigate to the Web Store page for the LINE extension, click the "CRX" button in the toolbar, and select "Download as CRX" +1. Download a .crx or .zip file of the [LINE Chrome extension](https://chrome.google.com/webstore/detail/line/ophjlpahpchlmihnnnihgmmeilfjmjjc) (current version: 2.4.5) + * The recommended way of doing this is with the [CRX Extractor/Downloader](https://chrome.google.com/webstore/detail/crx-extractordownloader/ajkhmmldknmfjnmeedkbkkojgobmljda) extension for Chrome/Chromium. Simply install that extension in a Chrome/Chromium instance of your choice, then navigate to the Web Store page for the LINE extension, click the "CRX" button in the toolbar, and select "Download as ZIP" 1. Extract the downloaded .crx file to `puppet/extension_files` - * This can be done with `unzip *.crx -d puppet/extension_files`, or with a GUI tool like GNOME File Roller + * This can be done with `unzip <*.crx|*.zip> -d puppet/extension_files`, or with a GUI tool like GNOME File Roller 1. `cd` to the `puppet` directory and run `yarn --production` 1. Run `node prep_helper.js` to open the version of Chrome downloaded by Puppeteer, and click on the LINE icon next to the URL bar 1. Once the LINE popup appears, press F12 to show DevTools, which will reveal the LINE extension's UUID @@ -40,4 +43,4 @@ An easy way to do so is to install `xvfb` from your distribution, and run the Pu # Upgrading Simply `git pull` or `git rebase` the latest changes, and rerun any installation commands (`yarn --production`, `pip install -Ur ...`). -To upgrade the LINE extension used by Puppeteer, simply download and extract the latest .crx in the same location as for initial setup. +To upgrade the LINE extension used by Puppeteer, simply download a .crx/.zip of the latest version of the extension, and extract it in the same location as for initial setup. diff --git a/puppet/.gitignore b/puppet/.gitignore index ab914c0..387d417 100644 --- a/puppet/.gitignore +++ b/puppet/.gitignore @@ -1,2 +1,3 @@ /node_modules /config*.json +/*.sock diff --git a/puppet/README.md b/puppet/README.md index 0fbf271..1dc43d4 100644 --- a/puppet/README.md +++ b/puppet/README.md @@ -16,9 +16,9 @@ The `extension_dir` specifies which directory contains the files for the LINE ex `cycle_delay` specifies the period (in milliseconds) at which Puppeteer should view chats to check on their read receipts. Only chats with messages that haven't been fully read need to be checked. ### `xdotool` -Set `use_xdotool` to `true` to allow the Node process to manipulate the mouse cursor of the X server it runs in. Requires the `xdotool` utility to be installed. Highly recommended, especially when running in a virtual X server. Its default value is `false` so that running in a non-virtual X server won't interfere with a real mouse cursor. +Set `use_xdotool` to `true` to allow the Node process to manipulate the mouse cursor of the X server it runs in. Requires the `xdotool` utility to be installed. Highly recommended, especially when running in a background X server. Its default value is `false` so that running in a non-background X server won't interfere with a real mouse cursor. -`jiggle_delay` specifies the period (in milliseconds) between "jiggling" the mouse cursor (necessary to keep the LINE extension active). Only relevant when `use_xdotool` is `true`. +`jiggle_delay` specifies the period (in milliseconds) for "jiggling" the mouse cursor (necessary to keep the LINE extension active). Only relevant when `use_xdotool` is `true`. ### DevTools Set `devtools` to `true` to launch Chromium with DevTools enabled by default.