Enable conversation open when app started offline (#2064)

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.
This commit is contained in:
Scott Nonnenberg 2018-02-22 11:14:26 -08:00 committed by GitHub
parent 426dab85a2
commit 42c24dd098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -911,6 +911,11 @@
},
getProfile: function(id) {
if (!textsecure.messaging) {
var message = 'Conversation.getProfile: textsecure.messaging not available';
return Promise.reject(new Error(message));
}
return textsecure.messaging.getProfile(id).then(function(profile) {
var identityKey = dcodeIO.ByteBuffer.wrap(profile.identityKey, 'base64').toArrayBuffer();