Commit Graph

127 Commits

Author SHA1 Message Date
85dc7a842e Don't view LINE DMs whenever possible
Use the sidebar to sync DM messages instead of visiting the DM itself,
so as to not make LINE (and your contact) think you really read the DM.

This cannot be done for non-text messages (which are not previwable in
the sidebar) and non-DM chats (whose sidebar messages don't say who sent
a message).
2021-06-10 02:54:12 -04:00
0d849cf2bb JSON stringify objects before logging them
Because Eclipse/Wild Web Developer messes them up
2021-06-10 02:52:25 -04:00
e37a7c41bf Minor formatting changes 2021-06-10 02:52:13 -04:00
c5eea7b50b Fix crash when logging in after a forced logout
Also tidy up bridge notices during the login flow
2021-06-08 00:24:00 -04:00
9d1d6e379c Support LINE users with no discoverable ID
AKA "strangers". Should only happen to non-friends in rooms (not groups!)
2021-06-06 18:24:44 -04:00
ec14b90711 Allow syncing pathless avatar images
But only if a path wasn't yet found for that image
2021-06-06 18:24:42 -04:00
14de373787 Startup fixes 2021-06-06 18:24:42 -04:00
54507f8aaf Catch getting logged out
Happens when logging into Line on Chrome somewhere else
2021-06-06 18:24:34 -04:00
34ea2021ec Attempt to respect bridge.initial_conversation_sync
But probably doing it wrong
2021-06-06 18:21:32 -04:00
6d646e082b Inbound sync & sticker improvements
- Handle "decrypting" state of messages
- Handle lazy loading of emoji
- Better handle lazy loading of images/stickers
- Improve reliability of message sending, especially when sending
  several messages quickly
- Use m.sticker events for inbound stickers instead of m.image, and add
  a config to optionally use m.image if desired
- Use proper sizing for emoji, and add config to scale them since they
  are somewhat small
- Deduplicate stickers as best as possible (works until they get a
  different blob URL)
- Add config to disable bridging stickers/emoji
- Send m.notice for inbound messages of unknown type
2021-06-06 18:15:38 -04:00
712a256dee Fix incorrect time parsing
For some reason, string-interpolating the result of chrono.parseDate
can set the time of day-only dates to noon, instead of midnight, which
is much more useful as a baseline time.

To get midnight, prepend "00:00" to all day-only date strings before
parsing them with chrono.parseDate.
2021-06-05 23:56:54 -04:00
6583815301 Dismiss error dialog for getting disconnected
If the connection to LINE is lost, when it comes back, and error dialog
appears. Detect that dialog and click it automatically.

The same detection works for any error dialog.
2021-06-05 23:51:12 -04:00
94788a21dd Various fixes and cleanups 2021-06-05 23:41:05 -04:00
6f8a8fd6a0 Remove Puppeteer timeout for prep script 2021-05-17 02:05:07 -04:00
862398c00e Update READMEs with xvfb instructions (and more) 2021-05-06 02:58:27 -04:00
a2a21927cd Fix image/file sending 2021-05-06 00:43:26 -04:00
d080590c54 Document minimum requirements
Also bump the LINE extension version mentioned in SETUP.md (which the
bridge still works with, as far as I can tell)
2021-05-03 02:44:11 -04:00
4305d8f994 Fix tracking "Read by" counts in group chats 2021-04-30 02:56:15 -04:00
e13f59a8f3 Rework message syncing and sending 2021-04-27 02:59:16 -04:00
7f937d34e2 WIP read receipt improvements 2021-04-23 03:38:13 -04:00
c8d1d38d21 Incoming read receipts for MRU chats
TODO: poll other chats for read receipts
2021-04-22 02:40:50 -04:00
d30402a98f More robust message syncing and room cleaning 2021-04-22 02:39:52 -04:00
0ce6b833e3 Attempt to fix ordering of incoming messages 2021-04-21 02:38:10 -04:00
a743d149df Touch up JS comment blocks 2021-04-06 01:57:15 -04:00
935bc6bdb8 Maybe fix message sorting 2021-04-06 01:57:15 -04:00
fc8bc79ffd Inbound sticons (emoticons)
MAJOR TODO: Non-duplication of uploaded image data
2021-04-05 03:56:01 -04:00
5aa3cf8b81 Add missing paren 2021-04-05 03:56:01 -04:00
4f288b1754 Support EmojiOne for inbound messages
Use their Unicode format, which is available in alt text
2021-04-03 03:11:51 -04:00
fa6d3b5279 Just-in-case sort of synced messages 2021-04-03 03:11:05 -04:00
510018a51d Inbound stickers (same as images)
This also covers sticons, but only when a single one is sent as the sole
content of a message, in which case it behaves like a sticker/image.
2021-04-02 03:21:30 -04:00
9d6c7efa70 Confirm this works with extension version 2.4.3
Just update SETUP.md to mention the version, and remove the TODO for
adding phone number login, which LINE Chrome will disable soon.
2021-03-31 01:55:11 -04:00
afcc206a93 Wait for outbound images to be sent
Also prevent possible race condition in waiting for inbound images, and
generally tighten up file sending/receiving.
2021-03-29 01:25:05 -04:00
5a33500765 Wait for inbound images to load 2021-03-28 04:23:07 -04:00
00e7226efe Outbound images, no echo 2021-03-28 03:16:07 -04:00
36ba98fda1 Outbound images (bad echo) 2021-03-27 03:37:41 -04:00
a5d9cc5ebc Inbound images 2021-03-27 01:12:43 -04:00
04c09cea1f Actually print message on incorrect email/password 2021-03-26 02:48:11 -04:00
884d0d32fe Working avatars and icons 2021-03-26 02:27:21 -04:00
b007751610 Avatar and icon URLs 2021-03-23 02:37:30 -04:00
8263023d2b Update links 2021-03-19 13:30:09 -04:00
456ac7ff50 Rename again 2021-03-15 01:40:56 -04:00
20f419a5c3 multi-user chats 2021-03-14 04:18:22 -04:00
b25bac8cea Rename 2021-02-26 14:19:48 -05:00
008b3106dd Add setup instructions 2021-02-26 03:27:25 -05:00
5d77852d7a First crack at message receiving 2021-02-26 02:23:59 -05:00
1b7642ce6d Cleanups and speedups 2021-02-26 02:23:59 -05:00
0260ad89f4 First crack at backfilling 2021-02-26 02:23:59 -05:00
ec081e94df Some tweaks and comments 2021-02-26 02:23:59 -05:00
eb0f37274c Message sending 2021-02-26 02:23:59 -05:00
cbe1fd7059 Syncable chat lists 2021-02-26 02:23:54 -05:00
1280916455 Attempt at syncing list of chats and their participants 2021-02-26 02:23:13 -05:00
e072d4709c Better tracking of loginRunning/Cancelled 2021-02-26 02:23:13 -05:00
874fb375d9 Fix some more login problems 2021-02-26 02:23:13 -05:00
e8592dcc8b Use functions that return a Promise 2021-02-26 02:23:13 -05:00
85814f9793 More changes 2021-02-26 02:22:41 -05:00
63dc7f0be3 Initial changes 2021-02-26 01:35:20 -05:00
9033ec856b Rename amp->line 2021-02-26 01:28:54 -05:00
Tulir Asokan
684e5bcf38 Add basic websocket login API 2020-12-29 16:33:33 +02:00
Tulir Asokan
d32e3819b0 Don't set connected metric if user is not logged in 2020-11-10 00:23:00 +02:00
Tulir Asokan
e7b78f9166 Update mautrix-python and add hacky connection metric 2020-11-03 17:57:51 +02:00
Tulir Asokan
8bef004a46 Bridge read-only status to Matrix when creating room 2020-08-28 19:56:19 +03:00
Tulir Asokan
a7ffe6761a Fix getting ID after sending and missed message backfilling 2020-08-28 19:34:13 +03:00
Tulir Asokan
a3441a40ae Initial bridge stuff 2020-08-28 16:38:06 +03:00
Tulir Asokan
c3f2a5dfe1 Add some disconnection handling and a method to set the last message ID map 2020-08-24 23:29:09 +03:00
Tulir Asokan
5c7faa01a6 Use --no-sandbox by default in docker 2020-08-24 23:28:46 +03:00
Tulir Asokan
a80e77ab3f Fix handling chat list mutations 2020-08-24 23:00:32 +03:00
Tulir Asokan
ac3b47657e Formatting fixes 2020-08-24 22:42:27 +03:00
Tulir Asokan
0480fcdf3b Remove trailing comma 2020-08-24 18:56:37 +03:00
Tulir Asokan
5e828ae68d Run as non-root user and add optional no-sandbox flag 2020-08-24 18:54:37 +03:00
Tulir Asokan
03e8090cd1 Add flag to set browser executable path 2020-08-24 18:26:07 +03:00
Tulir Asokan
ccf7e25f46 Downgrade to puppeteer 5.1.0 to use chromium from Alpine repos 2020-08-24 18:10:16 +03:00
Tulir Asokan
0d913d73d7 Add config and improve stopping 2020-08-24 16:45:44 +03:00
Tulir Asokan
57a5ee8164 Add docker image for puppeteer script 2020-08-24 15:23:10 +03:00
Tulir Asokan
814c8cbdb3 Add better shutdown handling 2020-08-24 14:55:44 +03:00
Tulir Asokan
938068703b Catch JSON parse errors 2020-08-18 17:05:53 +03:00
Tulir Asokan
dd16b3d461 Add API for puppeteer script 2020-08-18 16:47:16 +03:00
Tulir Asokan
6c11f73ef4 Initial commit
The puppeteer script kind of works, but needs an API.
The bridge doesn't exist yet.
2020-08-17 22:03:12 +03:00