Show status messages via object creation

This commit is contained in:
JC Brand 2020-04-19 08:11:53 +02:00
parent 8a7b25584d
commit edf7f6b8d3
2 changed files with 1 additions and 13 deletions

View File

@ -20,7 +20,6 @@ import tpl_info from "templates/info.html";
import tpl_new_day from "templates/new_day.html";
import tpl_spinner from "templates/spinner.html";
import tpl_spoiler_button from "templates/spoiler_button.html";
import tpl_status_message from "templates/status_message.html";
import tpl_toolbar from "templates/toolbar.html";
import tpl_toolbar_fileupload from "templates/toolbar_fileupload.html";
import tpl_user_details_modal from "templates/user_details_modal.js";
@ -1194,15 +1193,7 @@ converse.plugins.add('converse-chatview', {
} else if (show === 'online') {
text = __('%1$s is online', fullname);
}
if (text) {
this.msgs_container.insertAdjacentHTML(
'beforeend',
tpl_status_message({
'message': text,
'isodate': (new Date()).toISOString(),
}));
this.scrollDown();
}
text && this.model.createMessage({'message': text, 'type': 'info'});
}
},

View File

@ -1,3 +0,0 @@
<div class="message chat-info chat-status"
data-isodate="{{{o.isodate}}}"
data-status="{{{o.from}}}">{{{o.message}}}</div>