mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Register correctly to events
This commit is contained in:
		@@ -619,15 +619,15 @@ ComunicWeb.pages.conversations.conversation = ConversationPageConvPart;
 | 
				
			|||||||
document.addEventListener("newConvMessage", (e) => {
 | 
					document.addEventListener("newConvMessage", (e) => {
 | 
				
			||||||
	const msg = e.detail;
 | 
						const msg = e.detail;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if(ComunicWeb.pages.conversations.conversation._conv_info.id == msg.convID)
 | 
						if (ComunicWeb.pages.conversations.conversation._conv_info.id == msg.conv_id)
 | 
				
			||||||
	ComunicWeb.pages.conversations.conversation.applyMessages([msg]);
 | 
							ComunicWeb.pages.conversations.conversation.applyMessages([msg]);
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Register to message update events
 | 
					// Register to message update events
 | 
				
			||||||
document.addEventListener("updatedConvMessage", async (e) => {
 | 
					document.addEventListener("updatedConvMessage", async (e) => {
 | 
				
			||||||
	const msg = e.detail;
 | 
						const msg = e.detail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const target = document.querySelector("[data-chatpage-msg-text-id='"+msg.ID+"'] .txt")
 | 
						const target = document.querySelector("[data-chatpage-msg-text-id='"+msg.id+"'] .txt")
 | 
				
			||||||
	if(!target)
 | 
						if(!target)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user