fix newMessage

add-admin-interface
adb 3 years ago
parent c7c7d2c120
commit afbb98eb4d

@ -36,14 +36,15 @@ export default {
}, },
methods: { methods: {
async sendMessage(){ async sendMessage(){
if (this.msg.content.body !== "") { let content = this.msg.content;
let msgSend = Object.assign({}, this.msg); if (!content.body) return;
this.msg.content.body = ""; //content.body = content.body.replace(/\n$/gm, '');
await matrix.sendEvent(msgSend, this.roomId); let msgSend = Object.assign({}, this.msg);
let id = this.$refs.newMessageInput; await matrix.sendEvent(msgSend, this.roomId);
id.style.height = "1.25rem"; content.body = "";
this.onResize(id.parentElement.clientHeight); let id = this.$refs.newMessageInput;
} id.style.height = "1.25rem";
this.onResize(id.parentElement.clientHeight);
}, },
resizeMessageBanner(){ resizeMessageBanner(){
let id = this.$refs.newMessageInput; let id = this.$refs.newMessageInput;

Loading…
Cancel
Save