fix
This commit is contained in:
		
							parent
							
								
									18dec89355
								
							
						
					
					
						commit
						1bc145678b
					
				
					 2 changed files with 6 additions and 10 deletions
				
			
		|  | @ -116,7 +116,7 @@ export async function prefetchEmojis(emojis: { name: string; host: string | null | ||||||
| 	} | 	} | ||||||
| 	const _emojis = emojisQuery.length > 0 ? await Emojis.find({ | 	const _emojis = emojisQuery.length > 0 ? await Emojis.find({ | ||||||
| 		where: emojisQuery, | 		where: emojisQuery, | ||||||
| 		select: ['name', 'host', 'url'], | 		select: ['name', 'host', 'originalUrl', 'publicUrl'], | ||||||
| 	}) : []; | 	}) : []; | ||||||
| 	for (const emoji of _emojis) { | 	for (const emoji of _emojis) { | ||||||
| 		cache.set(`${emoji.name} ${emoji.host}`, emoji); | 		cache.set(`${emoji.name} ${emoji.host}`, emoji); | ||||||
|  |  | ||||||
|  | @ -81,19 +81,15 @@ export default async (user: { id: User['id']; host: User['host']; }, note: Note, | ||||||
| 			name: decodedReaction.name, | 			name: decodedReaction.name, | ||||||
| 			host: decodedReaction.host, | 			host: decodedReaction.host, | ||||||
| 		}, | 		}, | ||||||
| 		select: ['name', 'host', 'url'], | 		select: ['name', 'host', 'originalUrl', 'publicUrl'], | ||||||
| 	}); | 	}); | ||||||
| 
 | 
 | ||||||
| 	if (emoji) { |  | ||||||
| 		emoji = { |  | ||||||
| 			name: emoji.host ? `${emoji.name}@${emoji.host}` : `${emoji.name}@.`, |  | ||||||
| 			url: emoji.publicUrl, |  | ||||||
| 		} as any; |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	publishNoteStream(note.id, 'reacted', { | 	publishNoteStream(note.id, 'reacted', { | ||||||
| 		reaction: decodedReaction.reaction, | 		reaction: decodedReaction.reaction, | ||||||
| 		emoji: emoji, | 		emoji: emoji != null ? { | ||||||
|  | 			name: emoji.host ? `${emoji.name}@${emoji.host}` : `${emoji.name}@.`, | ||||||
|  | 			url: emoji.publicUrl ?? emoji.originalUrl, | ||||||
|  | 		} : null, | ||||||
| 		userId: user.id, | 		userId: user.id, | ||||||
| 	}); | 	}); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue