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:
parent
426dab85a2
commit
42c24dd098
1 changed files with 5 additions and 0 deletions
|
@ -911,6 +911,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
getProfile: function(id) {
|
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) {
|
return textsecure.messaging.getProfile(id).then(function(profile) {
|
||||||
var identityKey = dcodeIO.ByteBuffer.wrap(profile.identityKey, 'base64').toArrayBuffer();
|
var identityKey = dcodeIO.ByteBuffer.wrap(profile.identityKey, 'base64').toArrayBuffer();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue