diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index be5be6c97..b2b23d2ea 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -924,7 +924,9 @@ MessageSender.prototype = { getOurProfile() { try { - const ourNumber = textsecure.storage.user.getNumber(); + // Secondary devices have their profile stored + // in their primary device's conversation + const ourNumber = window.storage.get('primaryDevicePubKey'); const conversation = window.ConversationController.get(ourNumber); return conversation.getLokiProfile(); } catch (e) {