forked from cadence/out-of-your-element
		
	Fix replying to a message that had a new emoji
Without this, the emoji consistency assertion would fail because we must call transformContent to upload the emoji to Matrix.
This commit is contained in:
		
							parent
							
								
									bb711c26ac
								
							
						
					
					
						commit
						2a6284968f
					
				
					 1 changed files with 1 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -477,14 +477,7 @@ async function messageToEvent(message, guild, options = {}, di) {
 | 
			
		|||
			}
 | 
			
		||||
			if (repliedToContent == "") repliedToContent = "[Media]"
 | 
			
		||||
			else if (!repliedToContent) repliedToContent = "[Replied-to message content wasn't provided by Discord]"
 | 
			
		||||
			const repliedToHtml = markdown.toHTML(repliedToContent, {
 | 
			
		||||
				discordCallback: getDiscordParseCallbacks(message, guild, true)
 | 
			
		||||
			})
 | 
			
		||||
			const repliedToBody = markdown.toHTML(repliedToContent, {
 | 
			
		||||
				discordCallback: getDiscordParseCallbacks(message, guild, false),
 | 
			
		||||
				discordOnly: true,
 | 
			
		||||
				escapeHTML: false,
 | 
			
		||||
			})
 | 
			
		||||
			const {body: repliedToBody, html: repliedToHtml} = await transformContent(repliedToContent)
 | 
			
		||||
			if (repliedToEventRow) {
 | 
			
		||||
				// Generate a reply pointing to the Matrix event we found
 | 
			
		||||
				html = `<mx-reply><blockquote><a href="https://matrix.to/#/${repliedToEventRow.room_id}/${repliedToEventRow.event_id}">In reply to</a> ${repliedToUserHtml}`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue