Make sure messages re-render when 'error' is added

This commit is contained in:
JC Brand 2020-05-14 15:00:47 +02:00
parent 3cca2fdb7f
commit ef66f2e35d

View File

@ -144,8 +144,19 @@ converse.plugins.add('converse-message-view', {
if (this.model.changed.progress) {
return this.renderFileUploadProgresBar();
}
// TODO: We can remove this once we render messages via lit-html
const isValidChange = prop => Object.prototype.hasOwnProperty.call(this.model.changed, prop);
const props = ['moderated', 'retracted', 'correcting', 'message', 'type', 'upload', 'received', 'editable', 'first_unread'];
const props = [
'correcting',
'editable',
'error',
'message',
'moderated',
'received',
'retracted',
'type',
'upload',
];
if (props.filter(isValidChange).length) {
await this.debouncedRender();
}