- document.getElementById("main-input").value = "";
- new_entry.setAttribute("class", "stream-entry");
- new_entry.appendChild(new_text);
+ if (self_sent) {
+ new_entry.setAttribute("class", "stream-entry self-sent");
+ document.getElementById("main-input").value = "";
+ } else {
+ new_entry.setAttribute("class", "stream-entry");
+ }
+ new_entry.innerHTML = data;