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
A recent change removed the type property to make markRead() behave
properly, but that broke our check 'should we send an update?' logic. So
instead of using `isIncoming()` we now use the thing we previously used
to determine whether a message was incoming: `receivedAt`.
When we mark a message as read, we go to the database to ensure that
older messages in this conversation are marked read as well. That
optimization was missing the read_at value provided to the starting
message, so now it is piped along to all of them.
Turns out that we reload thumbnails for every message when any new
message is added to the conversation. This fix prevents that by actually
checking for the proper sentinel on the message model
* Don't re-sort conversation list after expiration timer change
Now that we respond to the expiration timer included in contact and
group sync messages, we need to ensure that this doesn't pop
conversations to the top of the list.
* Introduce explaining variable for updateLastMessage filter
Hotfix: Ignore invalid expire timer sync resets
iOS omits `expireTimer` protobuf property to denote disappearing messages have been turned off. However, that doesn’t allow us to distinguish it from old clients that are not aware of this property. This change ignores these invalid values until we consistently use `0` to denote disabled disappearing messages (as Android does).
- [x] Ignore non-numeric `expireTimer` values during contact sync. Long-term, we’ll use `0` to denote turning off expire timers.
- [x] Log what value `expireTimer` is set to.
- [x] Log changes to `expireTimer` in `handleDataMessage` until it uses `ConversationController::updateExpirationTimer`.
Turns out textsecure.messaging is only set up on first connection to the
server. When we start up offline, we never do that. And it prevents the
user from opening every conversation.
There's a whole lot more to do to bulletproof ourselves against a
missing textsecure.messaging (and then beyond that, queuing outgoing
messages so they don't get dropped completely when offline).
Hence, it's a band-aid.