34 Commits

Author SHA1 Message Date
Jamie Kyle
3705b959d6 Remove end year from licenses 2023-01-03 11:55:46 -08:00
Fedor Indutny
98ef4c627a Update eslint to 8.27.0 2022-11-17 16:45:19 -08:00
Fedor Indutny
6be69a7ba8 Use DurationInSeconds for expireTimer 2022-11-16 13:18:02 -07:00
Scott Nonnenberg
026f574fdb Replace mentions with text when forwarding 2022-07-21 09:26:11 -07:00
Scott Nonnenberg
924c271b13 Convert js/modules/types/message to Typescript 2022-06-09 18:10:20 -07:00
Josh Perez
2f44e33c9c Move link notification to the conversation hero 2022-04-25 14:03:24 -07:00
Evan Hahn
74fde10ff5 Prefer import type when importing types 2021-10-26 14:15:33 -05:00
Fedor Indutny
fe040a2873 Rename ContactType to EmbeddedContactType 2021-08-19 20:56:39 -05:00
Evan Hahn
c4a09b7507 Refactor outbound delivery state, take 2
This reverts commit ad217c808d.
2021-07-19 17:44:49 -05:00
Fedor Indutny
c3bdf3d411 Show lightbox for GIFs 2021-07-14 16:39:52 -07:00
Fedor Indutny
ad217c808d Revert "Refactor outbound delivery state"
This reverts commit 9c48a95eb5.
2021-07-12 16:51:45 -07:00
Evan Hahn
9c48a95eb5 Refactor outbound delivery state 2021-07-09 16:38:51 -05:00
Evan Hahn
03a187097f Disappearing message cleanups 2021-06-16 17:20:17 -05:00
Evan Hahn
8bfaf598af Add license headers across the project 2020-11-04 13:03:13 -06:00
Sidney Keese
2ade4acd52 Migrate util, types, state, sticker-creator to ESLint 2020-09-21 15:42:51 -04:00
Scott Nonnenberg
d75eee015f Show notifications when a user's profile name changes 2020-07-30 13:27:44 -07:00
Ken Powers
ba5e2ff6e5 Receive support for DOE messages 2020-04-29 17:42:41 -07:00
Josh Perez
4830213a12 Sort by inbox position to match phone after link 2020-03-24 17:02:01 -07:00
Scott Nonnenberg
d42eb2126e Changes to View Once 2019-08-05 16:23:47 -07:00
Scott Nonnenberg
e62a1a7812 Receive support for View Once photos 2019-07-17 11:29:51 -07:00
Scott Nonnenberg
d342b23cbc Refactor: Prepare Message function props for conversation scope 2019-05-07 09:41:09 -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
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