Don't play notification sound when msg.fromMe
This commit is contained in:
parent
3ba0f9792c
commit
9480c600f9
3 changed files with 12 additions and 2 deletions
6
ui.js
6
ui.js
|
|
@ -92,6 +92,7 @@ export const ui = {
|
|||
}
|
||||
|
||||
for (const chat of chats) {
|
||||
console.log(chat);
|
||||
const li = document.createElement('li');
|
||||
li.className = `chat-item ${activeChat && activeChat.id === chat.id ? 'active' : ''}`;
|
||||
li.dataset.id = chat.id;
|
||||
|
|
@ -119,6 +120,11 @@ export const ui = {
|
|||
elements.chatList.appendChild(li);
|
||||
}
|
||||
},
|
||||
|
||||
async updateChatInChatList(msg) {
|
||||
const li = document.getElementById(msg.from);
|
||||
li.querySelector(".chat-item-msg").innerText = msg.body;
|
||||
},
|
||||
|
||||
/**
|
||||
* Render chat message log inside chat view container
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue