|
|
@ -210,6 +210,9 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getLokiNameForNumber(number) {
|
|
|
|
getLokiNameForNumber(number) {
|
|
|
|
const conversation = ConversationController.get(number);
|
|
|
|
const conversation = ConversationController.get(number);
|
|
|
|
|
|
|
|
if (number === textsecure.storage.user.getNumber()) {
|
|
|
|
|
|
|
|
return i18n('you');
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!conversation || !conversation.getLokiProfile()) {
|
|
|
|
if (!conversation || !conversation.getLokiProfile()) {
|
|
|
|
return number;
|
|
|
|
return number;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -506,6 +509,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
const contactModel = this.findContact(phoneNumber);
|
|
|
|
const contactModel = this.findContact(phoneNumber);
|
|
|
|
const color = contactModel ? contactModel.getColor() : null;
|
|
|
|
const color = contactModel ? contactModel.getColor() : null;
|
|
|
|
|
|
|
|
let profileName;
|
|
|
|
|
|
|
|
if (phoneNumber === window.storage.get('primaryDevicePubKey')) {
|
|
|
|
|
|
|
|
profileName = i18n('you');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
profileName = contactModel ? contactModel.getProfileName() : null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
phoneNumber: format(phoneNumber, {
|
|
|
|
phoneNumber: format(phoneNumber, {
|
|
|
@ -514,7 +523,7 @@
|
|
|
|
color,
|
|
|
|
color,
|
|
|
|
avatarPath: contactModel ? contactModel.getAvatarPath() : null,
|
|
|
|
avatarPath: contactModel ? contactModel.getAvatarPath() : null,
|
|
|
|
name: contactModel ? contactModel.getName() : null,
|
|
|
|
name: contactModel ? contactModel.getName() : null,
|
|
|
|
profileName: contactModel ? contactModel.getProfileName() : null,
|
|
|
|
profileName,
|
|
|
|
title: contactModel ? contactModel.getTitle() : null,
|
|
|
|
title: contactModel ? contactModel.getTitle() : null,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|