When opening a chat (like during a sync or in response to a new message
notification), the message list loads lazily, so not waiting for all
items to load can cause messages to be missed.
However, there doesn't seem to be any indicator for when a message list
has been fully loaded...
As a best effort attempt, simply wait until no new updates to the
message list have been seen for a while.
...that are sent from another client.
Also look up the profile data for the user's LINE account on sync,
including at startup, so that there's always a puppet available.
The message text input field in LINE chats doesn't play nice with
Puppeteer's "type" function for live-typing text...
It's a div instead of a text input, and uses innerText instead of value.
Setting its innerText directly seems to work best, so just use that.
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).
- 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
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.
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.