1. MessageReceiver always pulls down thumbnails included in quotes
2. Message.upgradeSchema has a new schema that puts all thumbnails on
disk just like happens with full attachments.
3. handleDataMessage pipes quote from dataMessage into the final message
destined for the database
- [x] Skip timestamp update for `verified-change` and expiring messages to
prevent them to bump to the top of the conversation list.
- [x] Skip message preview (`lastMessage`) update for `verified-change` messages
since they don’t contain any message body.
- [x] Reset last message if conversation is empty.
Fixes https://github.com/signalapp/Signal-Desktop/issues/980.
As a user, I’d like the app to autolink as many possible URL formats I write in
messages as possible, e.g.
- [x] URLs without protocol: `github.com`
- [x] URLs with in different languages (Unicode):
- [x] `https://zh.wikipedia.org/zh-hans/信号`
- [x] `https://ru.wikipedia.org/wiki/Сигнал`
- [x] URLs with single quotes: `https://www.example.com/this-couldn't-be-true`
- [x] Messages with URLs right after special characters:
`wink ;)https://www.youtube.com/watch?v=oHg5SJYRHA0`
- [x] URLs with square brackets:
`https://www.example.com/test.html?foo=bar&baz[qux]=quux`
- [x] **Infrastructure:** Include TypeScript files in build.
- [x] **Infrastructure:** Rename `ts/test` to `ts/styleguide`.
- [x] **Infrastructure:** Decouple linting from testing.
- [x] **Infrastructure:** Run all tests in CI.
- [x] **Infrastructure:** Compile TypeScript on CI.
### Dependencies
- Forked `link-text` to disable HTML escaping: It only has the minimum required
dependencies:
- `linkify-it`: Best-in-class link detection library with support for
Unicode/IDN. Popular alternative: `linkifyjs`.
Doesn’t handle Unicode in URLs.
- ~~`escape-html`: Standalone dependency for escaping HTML.~~
- `uc.micro`: Standalone dependency of Unicode data files.
### Known Issues
We don’t auto-link trailing exclamation points which in most cases would be
expected to be part of the message body rather than the link.
**Counterexample:** `https://en.wikipedia.org/wiki/Mother!`.
N.B. GitHub doesn’t do this right either.
Fixes#598.
Separate linting from testing as follows:
- `yarn jscs`: Run JSCS.
- `yarn jshint`: Run JSHint.
- `yarn lint`: Run all linters, i.e. ESLint, TSLint, JSHint, and JSHint.
- `yarn test-node`: Run Mocha tests in Node.js environment.
- `yarn test-electron`: Run tests in Electron environment via Grunt.
- `yarn test`: Run all tests.
CI
- Align Travis and AppVeyor scripts as much as possible.
- Run linting before tests to fail fast.
- Run Node.js (headless and fast) tests first.
- Run Electron tests last (Travis seems to require custom setup in `travis.sh`).