Commit graph

370 commits

Author SHA1 Message Date
Mikunj
1a4adf2281 Merge branch 'development' into merge/signal 2018-11-08 07:23:27 +11:00
Mikunj
f589fdac5c Merge signal changes into branch. 2018-11-07 15:26:37 +11:00
Mikunj
4e6df71999 Fix up tests. 2018-11-07 12:15:22 +11:00
Scott Nonnenberg
ca61c9cb85 Warnings for dangerous files 2018-10-09 13:48:32 -07:00
Scott Nonnenberg
cd60bdd08a Move conversations to SQLCipher 2018-10-01 18:18:37 -07:00
Scott Nonnenberg
7983300f4a Use base64 strings for incoming message cache instead of binary 2018-08-10 13:13:25 -07:00
Scott Nonnenberg
3105b77475 Migrate to SQLCipher for messages/cache
Quite a few other fixes, including:
  - Sending to contact with no avatar yet (not synced from mobile)
  - Left pane doesn't update quickly or at all on new message
  - Left pane doesn't show sent or error status

Also:
 - Contributing.md: Ensure set of linux dev dependencies is complete
2018-07-31 17:08:45 -07:00
Scott Nonnenberg
61f7b8360b Conversation: store lastMessage/lastMessageStatus in memory only 2018-07-27 10:55:10 -07:00
Scott Nonnenberg
f39a96bc76 Move to centralized message/cache data layer
Also, ensure that conversation.messageCollection has nothing in it
unless it has an associated ConversationView.
2018-07-27 10:55:10 -07:00
Scott Nonnenberg
34231168a7 On message delete, ensure that all external files are deleted 2018-07-27 09:15:57 -07:00
Scott Nonnenberg
5933a34a18 Use window.log in browser context, turn on console eslint rule 2018-07-21 14:52:43 -07:00
Scott Nonnenberg
b159a8d7c7 Update the user agent for debug log requests 2018-07-18 20:00:10 -07:00
Scott Nonnenberg
3c69886320 Finish new Message component, integrate into application
Also:
- New schema version 8 with video/image thumbnails, screenshots, sizes
- Upgrade messages not at current schema version when loading messages
  to show in conversation
- New MessageDetail react component
- New ConversationHeader react component
2018-07-17 15:58:07 -07:00
Scott Nonnenberg
43a44793c5 Remove jshint - move everything over to eslint
Also removed all hints of previous linters
2018-07-17 15:54:32 -07:00
Scott Nonnenberg
fc5c52fbdf Remove iOS theme in favor of plain light/dark themes 2018-07-17 15:45:40 -07:00
Scott Nonnenberg
ad4387803b New media permission, show dialog when not enabled for voice msg
UI now in separate renderer:
  - the permissions popup
  - settings dialog
  - debug log dialog
  - about window

Couple bug fixes:
  - About Window: Fix 'escape' to close window
  - Remove outdated dist/copy tasks from Gruntfile

Eslintified settings_view.js
2018-07-03 16:04:21 -07:00
Scott Nonnenberg
4415293100 Make all OS menus localizable
Turns out that Electron is not localizing the 'role' elements like we
expected would happen.
2018-07-03 16:04:21 -07:00
Scott Nonnenberg
8eeaad8e18 Remove unused export/import functionality 2018-06-21 11:54:01 -07:00
Scott Nonnenberg
068cce61e6 Fix path-oriented unit test on Windows 2018-05-31 14:09:41 -07:00
Scott Nonnenberg
f3bd0cf903 Refactor api.js into web_api, which encapsulates all web access 2018-05-31 13:25:45 -07:00
Scott Nonnenberg
eec61f5289 Fine-tune file protocol filter 2018-05-31 13:25:45 -07:00
Scott Nonnenberg
06b0544bbe Hardening: normalize on-disk attachment paths before save/load 2018-05-31 13:25:45 -07:00
Scott Nonnenberg
cfe0bd0e79 Move to npm for several dependencies
mustache
jQuery
underscore
backbone
mocha
chai
intl-tel-input
2018-05-23 16:26:48 -07:00
Scott Nonnenberg
01be58acc2 Remove formatting in importError localization string 2018-05-23 16:26:48 -07:00
Scott Nonnenberg
548c8e69cf Emojification now all done with react via a few new components
Three locations were changed:
  1. a group update, which lists a set of contacts
  2. the contact name in the left pane
  3. the conversation title

Three new components were added to window.Signal.Components to support
these scenarios, respectively:
  1. Emojify
  2. ContactName
  3. ConversationTitle

Note that there are a number of other places in the app that should be
emojified, but never have been before. Essentially any place that a
contact name might be shown. A non-exhaustive list:
  - Show group members
  - Show safety number
  - Verified change notification
  - Disappearing timer change notification
  - Contact verification notification
  - Quote contact name
2018-05-23 16:26:47 -07:00
Scott Nonnenberg
a5416e42c4 Refactor all emoji utility methods into window.Signal.Emoji 2018-05-23 16:26:47 -07:00
Scott Nonnenberg
e2d044e02b Filter file scheme; disable http, https and ftp entirely 2018-05-23 16:26:40 -07:00
Scott Nonnenberg
4e5c8965ff Move to react for newlines, emoji, and links in message body 2018-05-14 16:09:37 -07:00
Scott Nonnenberg
aa13a2c6f7 Parse phone numbers into e164 as part of schema upgrade 2018-05-10 11:54:58 -07:00
Daniel Gasienica
16bc1d34c6 Message schema 6: Change classification of media and documents
For an easier implementation, we change our original definition of
`initializeAttachmentMetadata`. This means we have to re-run it marked as
version 6 and mark schema version 5 as deprecated as its definition has changed.
2018-05-08 16:41:07 -04:00
Scott Nonnenberg
26be658892 Remove 'Contact' from 'Contact.*' properties, clean->parse 2018-05-08 13:12:11 -07:00
Scott Nonnenberg
adbe989949 validateContact: Return error instead of logging 2018-05-08 10:31:16 -07:00
Scott Nonnenberg
420f81ebcd Move contact migrate code from message.js to contact.js 2018-05-08 09:48:47 -07:00
Scott Nonnenberg
41be7f126b Visuals for embedded contacts as well as contact detail screen 2018-05-07 19:09:55 -07:00
Scott Nonnenberg
3ea3e4e256 Contact sharing: protos and data pipeline
As of this commit: 82b76ccf37
2018-05-07 19:09:55 -07:00
Daniel Gasienica
5c8f734e67 Remove newlines from group IDs 2018-05-03 13:24:39 -04:00
Daniel Gasienica
a102016ed8 Port Settings and OS to TypeScript 2018-05-02 20:01:57 -04:00
Daniel Gasienica
95321e5d3e Remove Vim mode lines 2018-04-30 16:53:34 -04:00
Daniel Gasienica
1dd87ad197 Format all source code using Prettier 2018-04-30 16:53:34 -04:00
Daniel Gasienica
41fe50553f Replace Backbone saveFile with Attachment.save 2018-04-27 16:31:42 -04:00
Daniel Gasienica
9a76d4bcf8 Whitelist assert global for tests 2018-04-27 16:31:42 -04:00
Daniel Gasienica
19411a78c8 Remove dead code 2018-04-25 15:25:12 -04:00
Daniel Gasienica
52e4e5aece Omit undefined keys when comparing IndexedDB data 2018-04-25 15:25:12 -04:00
Daniel Gasienica
f36f206a01 Use IndexablePresence for hasFileAttachments and hasVisualMediaAttachments
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
2018-04-25 15:25:12 -04:00
Daniel Gasienica
3a33d862c0 Update backup test fixture 2018-04-25 15:25:12 -04:00
Daniel Gasienica
8b9516de72 Update test for attachment metadata 2018-04-25 15:24:52 -04:00
Daniel Gasienica
b0e1cc49a5 Remove legacy Backbone lightbox 2018-04-25 15:24:51 -04:00
Daniel Gasienica
9d84b2f420 Index messages with attachments using a boolean
When indexing message attachment metadata using numeric indexes such as:

```javascript
{
  conversationId: '+12223334455',
  received_at: 123,
  attachments: […],
  numAttachments: 2,
},
{
  conversationId: '+12223334455',
  received_at: 456,
  attachments: [],
  numAttachments: 0,
}
{
  conversationId: '+12223334455',
  received_at: 789,
  attachments: [],
  numAttachments: 1,
}
```

It creates an index as follows:

```
[conversationId, received_at, numAttachments]
['+12223334455', 123, 2]
['+12223334455', 456, 0]
['+12223334455', 789, 1]
```

This means a query such as…

```
lowerBound: ['+12223334455', 0,                1               ]
upperBound: ['+12223334455', Number.MAX_VALUE, Number.MAX_VALUE]
```

…will return all three original entries because they span the `received_at`
from `0` through `Number.MAX_VALUE`. One workaround is to index booleans using
`1 | undefined` where `1` is included in the index and `undefined` is not, but
that way we lose the ability to query for the `false` value. Instead, we flip
adjust the index to `[conversationId, hasAttachments, received_at]` and can
then query messages with attachments using

```
[conversationId, 1 /* hasAttachments */, 0                /* received_at */]
[conversationId, 1 /* hasAttachments */, Number.MAX_VALUE /* received_at */]
```
2018-04-25 15:24:51 -04:00
Daniel Gasienica
f9e4613395 Move TS test for message migration 2018-04-25 15:24:50 -04:00
Daniel Gasienica
867bece952 Add Message.initializeAttachmentMetadata 2018-04-25 15:24:50 -04:00