Ensure that ConversationController.load is resilient to errors
This commit is contained in:
parent
b4e9c278d3
commit
67cb10fcae
2 changed files with 43 additions and 26 deletions
|
@ -1139,18 +1139,28 @@
|
|||
|
||||
const stickerData = this.get('sticker');
|
||||
if (stickerData) {
|
||||
const sticker = Signal.Stickers.getSticker(
|
||||
stickerData.packId,
|
||||
stickerData.stickerId
|
||||
);
|
||||
const { emoji } = sticker || {};
|
||||
if (!emoji) {
|
||||
window.log.warn('Unable to get emoji for sticker');
|
||||
try {
|
||||
const sticker = Signal.Stickers.getSticker(
|
||||
stickerData.packId,
|
||||
stickerData.stickerId
|
||||
);
|
||||
const { emoji } = sticker || {};
|
||||
if (!emoji) {
|
||||
window.log.warn('Unable to get emoji for sticker');
|
||||
}
|
||||
return {
|
||||
text: i18n('message--getNotificationText--stickers'),
|
||||
emoji,
|
||||
};
|
||||
} catch (error) {
|
||||
window.log.error(
|
||||
'getNotificationData: sticker fetch failed',
|
||||
error && error.stack ? error.stack : error
|
||||
);
|
||||
return {
|
||||
text: i18n('message--getNotificationText--stickers'),
|
||||
};
|
||||
}
|
||||
return {
|
||||
text: i18n('message--getNotificationText--stickers'),
|
||||
emoji,
|
||||
};
|
||||
}
|
||||
|
||||
if (this.isCallHistory()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue