Commit graph

168 commits

Author SHA1 Message Date
Mikunj 1f03e04d8c Merge commit 'c75a756b2a58bd4a79890e34673d95d9f17f3f01' into signal-1.23
# Conflicts:
#	js/views/conversation_view.js
#	package.json
#	ts/components/ConversationListItem.tsx
#	ts/components/conversation/ConversationHeader.tsx
2019-04-18 10:13:49 +10:00
Mikunj 12ce0140de Left pane changes.
Merge commit 'b3ac1373fa64117fe2a9ccfddf3712f1826c06d9' into signal-1.23

# Conflicts:
#	_locales/en/messages.json
#	background.html
#	js/background.js
#	js/conversation_controller.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/views/conversation_list_item_view.js
#	js/views/conversation_list_view.js
#	js/views/conversation_search_view.js
#	js/views/inbox_view.js
#	libtextsecure/account_manager.js
#	package.json
#	stylesheets/_global.scss
#	stylesheets/_index.scss
#	stylesheets/_modules.scss
#	test/_test.js
#	test/index.html
#	test/models/conversations_test.js
#	test/views/conversation_search_view_test.js
#	ts/components/ConversationListItem.tsx
#	ts/components/MainHeader.tsx
#	ts/components/conversation/ConversationHeader.tsx
#	ts/components/conversation/ResetSessionNotification.tsx
2019-04-17 16:42:09 +10:00
Mikunj 48c4ed1a29 Partial Merge commit 'bf904ddd129ceba8fa363ccf6d10ecd256c65f63' into signal-1.23
# Conflicts:
#	_locales/en/messages.json
#	app/sql.js
#	js/background.js
#	js/conversation_controller.js
#	js/models/conversations.js
#	js/views/inbox_view.js
#	main.js
2019-04-17 13:47:17 +10:00
Mikunj e343a04eea Merge commit '18b5b7c046436f2defab2e20407e22da180bf97b' into signal-1.22
# Conflicts:
#	app/sql.js
#	background.html
#	config/default.json
#	js/background.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/modules/data.js
#	js/signal_protocol_store.js
#	js/views/conversation_search_view.js
#	libtextsecure/message_receiver.js
#	libtextsecure/sendmessage.js
#	main.js
#	package.json
#	preload.js
#	test/index.html
#	ts/components/Avatar.tsx
#	ts/components/conversation/ConversationHeader.md
#	ts/components/conversation/ConversationHeader.tsx
2019-04-17 11:59:54 +10:00
Scott Nonnenberg 22f7a352f9 updateLastMessage: If we don't update last text, clear it 2019-04-12 14:06:34 -07:00
Derek Meer 7727dc093e Hides the "Hide menu bar" option on MacOS (#2903)
The "Hide menu bar" option is only applicable to Windows and some Linux distros,
where the menu bar is attached to the Signal window. Therefore, this commit
ensures that it doesn't show up on MacOS. It includes a setting,
isHideMenuBarSupported(), to control the option's appearance. This
commit also includes the tests to make sure isHideMenuBarSupported()
works correctly.

Fixes #2705
2019-04-08 10:25:14 -07:00
Scott Nonnenberg a2fca80759 Conversation.updateLastMessage: Properly clear timestamp/status 2019-04-04 17:17:19 -07:00
Scott Nonnenberg b3ac1373fa Move left pane entirely to React 2019-03-12 17:44:14 -07:00
Scott Nonnenberg bf904ddd12 On attachment save include date, include album index 2019-03-12 17:44:14 -07:00
Scott Nonnenberg 1d2c3ae23c Download attachments in separate queue from message processing 2019-02-12 16:34:21 -08:00
sachaaaaa a0f67c22da Merge branch 'textsecure/master' into merge_1_21_0
* textsecure/master: (26 commits)
  v1.21.0
  v1.21.0-beta.4
  Dark Theme: Preserve blue background on app loading screen
  Localization updates
  Fix width of audio player when window is very narrow
  A number of small fixes for Link Previews
  Get rid of the white flash when the app starts up (#3083)
  v1.21.0-beta.3
  Lint fixes
  Introduce new language: NB
  Fail over to all numbers in retry if errors don't have numbers
  Use the proper method for pulling attachments off disk for retry
  Fix rendering bug with verified state in updateVerified()
  Update electron-builder and electron-updater
  Ensure that dialog pops up when permissions denied for voice note
  Lint fixes
  Large update to localization strings
  Link Previews
  Ensure that blocked messages are dropped even after sealed sender
  Don't linkify quoted message contents
  ...

# Conflicts:
#	.github/PULL_REQUEST_TEMPLATE.md
#	_locales/cs/messages.json
#	background.html
#	config/default.json
#	index.html
#	js/models/conversations.js
#	js/modules/web_api.js
#	js/settings_start.js
#	js/views/conversation_view.js
#	js/views/settings_view.js
#	package.json
#	protos/SignalService.proto
#	stylesheets/_index.scss
#	stylesheets/_settings.scss
2019-02-06 13:53:20 +11:00
Mikunj ddfc99a461 Added online indicator to conversation header. 2019-02-05 14:22:55 +11:00
Scott Nonnenberg 813924685e Link Previews 2019-01-29 13:53:14 -08:00
Scott Nonnenberg cd60bdd08a Move conversations to SQLCipher 2018-10-01 18:18:37 -07:00
Scott Nonnenberg 643739f65d
Responding to feedback on the updated visuals (#2549)
* Conversation List Item: timestamp bold only when convo has unread

* Preserve the positioning of overlays on re-entry into convo

* ConversationListItem: Handle missing and broken thumbnails

* Shorten timestamp in left pane for better Android consistency

* Update convo last updated if last was expire timer change

But not if it was from a sync instead of from you or from a contact.

* Make links in quotes the same color as the text

* MediaGridItem: Update placeholder icon colors for dark theme

* Ensure turning off timer shows 'Timer set to off' in left pane

* ConversationListItem: Show unread count in blue circle

* Add one pixel margin to blue indicator for text alignment

* Ensure replies to voice message can bet sent successfully
2018-07-20 16:37:57 -07:00
Scott Nonnenberg 675e34fc8d New React component: ConversationListItem, installed in left pane
When collecting a conversation's last message, we grab that message's
status as well (if outgoing) and show it.
2018-07-17 20:25:55 -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 dc11db92f9 New React component: Message
Also: Use react to render contects on the 'show group members' screen
2018-07-17 15:53:33 -07:00
Scott Nonnenberg 2988da0981 Turn on all of Microsoft's recommend lint rules
Biggest changes forced by this: alt tags for all images, resulting in
new strings added to messages.json, and a new i18n paramter/prop added
in a plot of places.

Another change of note is that there are two new tslint.json files under
ts/test and ts/styleguide to relax our rules a bit there. This required
a change to our package.json script, as manually specifying the config
file there made it ignore our tslint.json files in subdirectories
2018-05-23 16:26:47 -07:00
Scott Nonnenberg d9e5338dff Refactor link/emoji/newline components for composability 2018-05-23 16:26:47 -07:00
Scott Nonnenberg 8f934251ae Fix a few types: relax contact, Email->Phone 2018-05-10 11:54:58 -07:00
Scott Nonnenberg 80b069e9b6 Move phone number format/parse into ts/types/PhoneNumber 2018-05-10 11:54:58 -07:00
Scott Nonnenberg 8cb1f1f532 Fall back on givenName/familyName if no displayName/organization 2018-05-10 11:54:58 -07:00
Daniel Gasienica 3bf8a8966a Notification improvements
- Remove on read, on focus, and on exit.
- Show multi-message notifications like '5 new messages'.
2018-05-10 14:45:56 -04: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
Daniel Gasienica f4a5bc9907 Add new MIME types 2018-05-08 16:41:06 -04:00
Daniel Gasienica 53918d68de Add Attachment.isFile definition 2018-05-08 16:41:06 -04:00
Daniel Gasienica 20246c4d07 Classify all images and videos as visual media
Even if we can’t play it back. Handle that in the lightbox.

Also: Exclude voice messages.
2018-05-08 16:41:06 -04:00
Scott Nonnenberg 0282635142 Remove Object.assign still hanging around in typescript 2018-05-08 09:57:51 -07:00
Scott Nonnenberg 8beeef4d10 Show contact name when you reply to message with a contact 2018-05-07 19:30:50 -07:00
Scott Nonnenberg 37821e5a1b Wire up all contact behaviors, refactor Contact type/selector 2018-05-07 19:11:35 -07:00
Daniel Gasienica 15759f0db5 Normalize package naming 2018-05-07 21:53:40 -04:00
Daniel Gasienica 5789b3eb75 Add Attachment.isVoiceMessage 2018-05-07 21:53:39 -04:00
Daniel Gasienica fa4c3fda2b Extract common MIME types 2018-05-07 21:53:39 -04:00
Daniel Gasienica 8a4f062120 Add MIME.APPLICATION_OCTET_STREAM 2018-05-07 21:53:39 -04:00
Daniel Gasienica 5d230d3778 Add Settings.isNotificationGroupingSupported
See: https://github.com/electron/electron/issues/11189
2018-05-04 15:37:46 -04:00
Daniel Gasienica ecf23b6b2e Disable audio notifications on Windows 7 and lower 2018-05-02 20:01:57 -04:00
Daniel Gasienica a102016ed8 Port Settings and OS to TypeScript 2018-05-02 20:01:57 -04:00
Daniel Gasienica 87d374ea78 Remove @prettier pragmas 2018-04-30 16:53:34 -04:00
Daniel Gasienica 110b58230b Only revoke object URLs we created 2018-04-30 11:01:57 -04:00
Daniel Gasienica e1b620602d Display attachments from disk 2018-04-27 16:31:43 -04:00
Daniel Gasienica 9451dc5e41 Define AttachmentSchemaVersion3 2018-04-27 16:31:43 -04:00
Daniel Gasienica 21db2e7182 Use saveURLAsFile 2018-04-27 16:31:43 -04:00
Daniel Gasienica 6ee56b8445 Remove newlines 2018-04-27 16:31:42 -04:00
Daniel Gasienica 4a5e61eaf4 Implement Attachment.save 2018-04-27 16:31:42 -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 74582de2d1 Clarify naming 2018-04-25 15:24:52 -04:00
Daniel Gasienica c6904476f4 Improve IndexableBoolean type 2018-04-25 15:24:51 -04:00
Daniel Gasienica 45d89d1e44 Create UserMessage type
Describes user visible messages that can have attachments.
2018-04-25 15:24:51 -04:00
Daniel Gasienica e5d90775d0 Add MapAsync type definition 2018-04-25 15:24:51 -04:00
Daniel Gasienica 648a7ab1bb Autoformat using Prettier 2018-04-25 15:24:51 -04:00
Daniel Gasienica e07458d886 Add basic Backbone type definitions 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 c46e1a1519 Move top-level functions to Signal.Util 2018-04-25 15:24:51 -04:00
Daniel Gasienica ae4c74dd5b Skip metadata initialization for verified-change messages 2018-04-25 15:24:51 -04:00
Daniel Gasienica 424965f876 🎨 Autoformat code 2018-04-25 15:24:51 -04:00
Daniel Gasienica fc1c3aabf5 Add scaffolding for media gallery 2018-04-25 15:24:51 -04:00
Daniel Gasienica 867bece952 Add Message.initializeAttachmentMetadata 2018-04-25 15:24:50 -04:00
Daniel Gasienica c5352cf26c Separate required from optional Message keys 2018-04-25 15:24:50 -04:00
Daniel Gasienica fc12353bb8 Add Attachment.isVisualMedia 2018-04-25 15:24:50 -04:00
Daniel Gasienica 6ff82adf0a Add MIME.isImage and MIME.isVideo 2018-04-25 15:24:50 -04:00
Daniel Gasienica df2e6e7864 Port MIME module to TypeScript 2018-04-25 15:24:50 -04:00
Daniel Gasienica 44debd123d Add basic implementation of Conversation.updateFromLastMessage 2018-04-11 19:34:21 -04:00
Daniel Gasienica cca5db3237 Remove unused import 2018-04-11 19:25:38 -04:00
Daniel Gasienica 1659354f51 Expand Message type definitions 2018-04-11 19:25:38 -04:00
Daniel Gasienica b50c55172d Add MIME type 2018-04-11 19:25:38 -04:00
Daniel Gasienica 65bf34d1b8 Add basic Attachment type definition 2018-04-11 19:25:38 -04:00
Daniel Gasienica f25a579f32 Add basic Message type definition 2018-04-11 19:25:38 -04:00