Reload member chat for each message sended
This commit is contained in:
parent
07726c0449
commit
db04fa955b
@ -151,7 +151,10 @@ class ChatElement extends HTMLElement {
|
||||
private initMessageEvents() {
|
||||
const sendButton = this.shadowRoot?.querySelector('#send-button');
|
||||
if (sendButton) {
|
||||
sendButton.addEventListener('click', () => this.sendMessage());
|
||||
sendButton.addEventListener('click', () => {
|
||||
this.sendMessage();
|
||||
setTimeout(() => this.reloadMemberChat(this.selectedMember), 500);
|
||||
});
|
||||
}
|
||||
|
||||
const messageInput = this.shadowRoot?.querySelector('#message-input');
|
||||
@ -161,6 +164,7 @@ class ChatElement extends HTMLElement {
|
||||
if (keyEvent.key === 'Enter' && !keyEvent.shiftKey) {
|
||||
event.preventDefault();
|
||||
this.sendMessage();
|
||||
setTimeout(() => this.reloadMemberChat(this.selectedMember), 500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user