mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Handle the messages of people who left the conversation
This commit is contained in:
parent
d3f6c293e1
commit
e5f91e6ab2
@ -879,11 +879,22 @@ const ConvChatWindow = {
|
|||||||
//Load user informations
|
//Load user informations
|
||||||
let userInfo = conversationInfo.membersInfos.get(message.user_id);
|
let userInfo = conversationInfo.membersInfos.get(message.user_id);
|
||||||
if(userInfo) {
|
if(userInfo) {
|
||||||
//Replace poster name
|
|
||||||
usernameElem.innerHTML = userInfo.fullName;
|
usernameElem.innerHTML = userInfo.fullName;
|
||||||
userAccountImage.src = userInfo.image;
|
userAccountImage.src = userInfo.image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
async () => {
|
||||||
|
try {
|
||||||
|
const userInfo = await userInfo(message.user_id);
|
||||||
|
usernameElem.innerHTML = userInfo.fullName;
|
||||||
|
userAccountImage.src = userInfo.image;
|
||||||
|
} catch(e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Add message
|
//Add message
|
||||||
var messageTargetElem = createElem2({
|
var messageTargetElem = createElem2({
|
||||||
appendTo: messageContainer,
|
appendTo: messageContainer,
|
||||||
|
Loading…
Reference in New Issue
Block a user