Commit Graph

22 Commits

Author SHA1 Message Date
Audric Ackermann cf44896a03
Minor call tweaks (#2051)
* show missed-call,started-call and answered call notification in chat

* fix types for createLastMessageUpdate

* show incoming dialog if we have a pending call when enable call receptio

* simplify a bit the avatar component

* move disableDrag to a custom hook

* speed up hash colors of avatarPlaceHolders

* fixup text selection and double click reply on message

* keep avatar decoded items longer before releasing memory

* add incoming/outgoing/missed call notification

also, merge that notification with the timer and group notification
component

* hangup call if no answer after 30sec

* refactor SessionInput using hook + add testid field for recovery

* disable message request feature flag for now

* fix merge issue

* force loading screen to be black instead of white

for our dark theme user's eyes safety
2021-11-29 17:40:46 +11:00
Audric Ackermann 5bf844241b
fix tests 2021-06-10 10:27:00 +10:00
Audric Ackermann a51f95d28c
move models to TS part1 2021-02-08 15:20:47 +11:00
Audric Ackermann 02fb5783a4
remove regionCode and PhoneNumber.ts 2021-01-28 09:46:15 +11:00
Audric Ackermann 72c96ea998
remove most of the SessionProtocol unused stuff
- prekeys
- SessionCipher
- LokiCipher
- endSession and the reset Session logic
- what we called Sessionprotocol manager (to keep track of session with
everyone)
2021-01-18 10:58:34 +11:00
Audric Ackermann 979a9058e3
remove verified number - related features (partial) 2021-01-18 10:35:16 +11:00
Audric Ackermann 53433261d9
remove outgoing_message.js and everything related to it 2020-07-13 17:10:20 +10:00
Audric Ackermann 9fd929e812
lint 2020-05-29 15:44:18 +10:00
Audric Ackermann fa26ff9e32
pass args by {} and add deviceLink tests 2020-05-25 11:40:17 +10: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
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
Scott Nonnenberg 37821e5a1b Wire up all contact behaviors, refactor Contact type/selector 2018-05-07 19:11:35 -07:00
Daniel Gasienica 87d374ea78 Remove `@prettier` pragmas 2018-04-30 16:53:34 -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 45d89d1e44 Create `UserMessage` type
Describes user visible messages that can have attachments.
2018-04-25 15:24:51 -04:00
Daniel Gasienica 648a7ab1bb Autoformat using Prettier 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 424965f876 🎨 Autoformat code 2018-04-25 15:24:51 -04:00
Daniel Gasienica c5352cf26c Separate required from optional `Message` keys 2018-04-25 15:24:50 -04:00
Daniel Gasienica 1659354f51 Expand `Message` type definitions 2018-04-11 19:25:38 -04:00
Daniel Gasienica f25a579f32 Add basic `Message` type definition 2018-04-11 19:25:38 -04:00