populate myreaction on replies for streams.
This commit is contained in:
		
							parent
							
								
									6c9eea2c0f
								
							
						
					
					
						commit
						63829047e6
					
				|  | @ -62,6 +62,13 @@ class GlobalTimelineChannel extends Channel { | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if (this.user && note.reply) { | ||||
| 			if (Object.keys(note.reply.reactions).length > 0) { | ||||
| 				const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); | ||||
| 				note.reply.myReaction = myRenoteReaction; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		this.connection.cacheNote(note); | ||||
| 
 | ||||
| 		this.send('note', note); | ||||
|  |  | |||
|  | @ -86,6 +86,13 @@ class HomeTimelineChannel extends Channel { | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if (this.user && note.reply) { | ||||
| 			if (Object.keys(note.reply.reactions).length > 0) { | ||||
| 				const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); | ||||
| 				note.reply.myReaction = myRenoteReaction; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		this.connection.cacheNote(note); | ||||
| 
 | ||||
| 		this.send('note', note); | ||||
|  |  | |||
|  | @ -101,6 +101,13 @@ class HybridTimelineChannel extends Channel { | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if (this.user && note.reply) { | ||||
| 			if (Object.keys(note.reply.reactions).length > 0) { | ||||
| 				const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); | ||||
| 				note.reply.myReaction = myRenoteReaction; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		this.connection.cacheNote(note); | ||||
| 
 | ||||
| 		this.send('note', note); | ||||
|  |  | |||
|  | @ -72,6 +72,13 @@ class LocalTimelineChannel extends Channel { | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if (this.user && note.reply) { | ||||
| 			if (Object.keys(note.reply.reactions).length > 0) { | ||||
| 				const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); | ||||
| 				note.reply.myReaction = myRenoteReaction; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		this.connection.cacheNote(note); | ||||
| 
 | ||||
| 		this.send('note', note); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue