Rich message rendering #24
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -108,7 +108,12 @@ class HTMLMessage extends MatrixEvent {
 | 
			
		|||
 | 
			
		||||
	static canRender(event) {
 | 
			
		||||
		const content = event.content
 | 
			
		||||
		return event.type === "m.room.message" && content.msgtype === "m.text" && content.format === "org.matrix.custom.html" && content.formatted_body
 | 
			
		||||
		return (
 | 
			
		||||
			event.type === "m.room.message"
 | 
			
		||||
				&& (content.msgtype === "m.text" || content.msgtype === "m.notice")
 | 
			
		||||
				&& content.format === "org.matrix.custom.html"
 | 
			
		||||
				&& content.formatted_body
 | 
			
		||||
		)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	canGroup() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue