Show status messages via object creation
This commit is contained in:
parent
8a7b25584d
commit
edf7f6b8d3
@ -20,7 +20,6 @@ import tpl_info from "templates/info.html";
|
|||||||
import tpl_new_day from "templates/new_day.html";
|
import tpl_new_day from "templates/new_day.html";
|
||||||
import tpl_spinner from "templates/spinner.html";
|
import tpl_spinner from "templates/spinner.html";
|
||||||
import tpl_spoiler_button from "templates/spoiler_button.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 from "templates/toolbar.html";
|
||||||
import tpl_toolbar_fileupload from "templates/toolbar_fileupload.html";
|
import tpl_toolbar_fileupload from "templates/toolbar_fileupload.html";
|
||||||
import tpl_user_details_modal from "templates/user_details_modal.js";
|
import tpl_user_details_modal from "templates/user_details_modal.js";
|
||||||
@ -1194,15 +1193,7 @@ converse.plugins.add('converse-chatview', {
|
|||||||
} else if (show === 'online') {
|
} else if (show === 'online') {
|
||||||
text = __('%1$s is online', fullname);
|
text = __('%1$s is online', fullname);
|
||||||
}
|
}
|
||||||
if (text) {
|
text && this.model.createMessage({'message': text, 'type': 'info'});
|
||||||
this.msgs_container.insertAdjacentHTML(
|
|
||||||
'beforeend',
|
|
||||||
tpl_status_message({
|
|
||||||
'message': text,
|
|
||||||
'isodate': (new Date()).toISOString(),
|
|
||||||
}));
|
|
||||||
this.scrollDown();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<div class="message chat-info chat-status"
|
|
||||||
data-isodate="{{{o.isodate}}}"
|
|
||||||
data-status="{{{o.from}}}">{{{o.message}}}</div>
|
|
Loading…
Reference in New Issue
Block a user