see how this different reactions format goes...
This commit is contained in:
		
							parent
							
								
									0fc8e68f15
								
							
						
					
					
						commit
						3f187e8107
					
				
					 3 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -18,10 +18,12 @@ async function addReaction(event) {
 | 
			
		|||
	// no need to sync the matrix member to the other side. but if I did need to, this is where I'd do it
 | 
			
		||||
 | 
			
		||||
	let emoji = event.content["m.relates_to"].key // TODO: handle custom text or emoji reactions
 | 
			
		||||
	emoji = encodeURIComponent(emoji)
 | 
			
		||||
	emoji = emoji.replace(/%EF%B8%8F/g, "")
 | 
			
		||||
	let encoded = encodeURIComponent(emoji)
 | 
			
		||||
	let encodedTrimmed = encoded.replace(/%EF%B8%8F/g, "")
 | 
			
		||||
 | 
			
		||||
	return discord.snow.channel.createReaction(channelID, messageID, emoji)
 | 
			
		||||
	console.log("add reaction from matrix:", emoji, encoded, encodedTrimmed)
 | 
			
		||||
 | 
			
		||||
	return discord.snow.channel.createReaction(channelID, messageID, encoded)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports.addReaction = addReaction
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue