mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	populate myreaction on replies for streams.
This commit is contained in:
		
							parent
							
								
									5eca807e19
								
							
						
					
					
						commit
						83460279c0
					
				
					 5 changed files with 35 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -72,6 +72,13 @@ class BubbleTimelineChannel 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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,6 +67,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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -88,6 +88,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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,6 +106,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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -77,6 +77,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…
	
	Add table
		
		Reference in a new issue