mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	fix: Filter featured collection (#12541)
This commit is contained in:
		
							parent
							
								
									a631b976c9
								
							
						
					
					
						commit
						238e8ce939
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -77,7 +77,7 @@ export class NotePiningService {
 | 
				
			||||||
		} as MiUserNotePining);
 | 
							} as MiUserNotePining);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Deliver to remote followers
 | 
							// Deliver to remote followers
 | 
				
			||||||
		if (this.userEntityService.isLocalUser(user)) {
 | 
							if (this.userEntityService.isLocalUser(user) && !note.localOnly && ['public', 'home'].includes(note.visibility)) {
 | 
				
			||||||
			this.deliverPinnedChange(user.id, note.id, true);
 | 
								this.deliverPinnedChange(user.id, note.id, true);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -105,7 +105,7 @@ export class NotePiningService {
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Deliver to remote followers
 | 
							// Deliver to remote followers
 | 
				
			||||||
		if (this.userEntityService.isLocalUser(user)) {
 | 
							if (this.userEntityService.isLocalUser(user) && !note.localOnly && ['public', 'home'].includes(note.visibility)) {
 | 
				
			||||||
			this.deliverPinnedChange(user.id, noteId, false);
 | 
								this.deliverPinnedChange(user.id, noteId, false);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -370,8 +370,9 @@ export class ActivityPubServerService {
 | 
				
			||||||
			order: { id: 'DESC' },
 | 
								order: { id: 'DESC' },
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const pinnedNotes = await Promise.all(pinings.map(pining =>
 | 
							const pinnedNotes = (await Promise.all(pinings.map(pining =>
 | 
				
			||||||
			this.notesRepository.findOneByOrFail({ id: pining.noteId })));
 | 
								this.notesRepository.findOneByOrFail({ id: pining.noteId }))))
 | 
				
			||||||
 | 
								.filter(note => !note.localOnly && ['public', 'home'].includes(note.visibility));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const renderedNotes = await Promise.all(pinnedNotes.map(note => this.apRendererService.renderNote(note)));
 | 
							const renderedNotes = await Promise.all(pinnedNotes.map(note => this.apRendererService.renderNote(note)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue