Merge pull request #2380 from yougotwill/patch-2

refactor: Removed duplicate check in Message getDescription()
pull/2184/merge
Audric Ackermann 3 years ago committed by GitHub
commit e950074d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1295,21 +1295,6 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
return window.i18n('answeredACall', [displayName]);
}
}
if (this.get('callNotificationType')) {
const displayName = getConversationController().getContactProfileNameOrShortenedPubKey(
this.get('conversationId')
);
const callNotificationType = this.get('callNotificationType');
if (callNotificationType === 'missed-call') {
return window.i18n('callMissed', [displayName]);
}
if (callNotificationType === 'started-call') {
return window.i18n('startedACall', [displayName]);
}
if (callNotificationType === 'answered-a-call') {
return window.i18n('answeredACall', [displayName]);
}
}
return this.get('body');
}
}

Loading…
Cancel
Save