mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-26 19:14:12 +00:00 
			
		
		
		
	refactor
This commit is contained in:
		
							parent
							
								
									17b83ff4c1
								
							
						
					
					
						commit
						be81c1a6d6
					
				
					 1 changed files with 12 additions and 10 deletions
				
			
		|  | @ -96,16 +96,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | |||
| 			let ltlNoteIdsRes: [string, string[]][] = []; | ||||
| 
 | ||||
| 			if (!ps.sinceId && !ps.sinceDate) { | ||||
| 				htlNoteIdsRes = await this.redisForTimelines.xrevrange( | ||||
| 					ps.withFiles ? `homeTimelineWithFiles:${me.id}` : `homeTimeline:${me.id}`, | ||||
| 					ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+', | ||||
| 					'-', | ||||
| 					'COUNT', limit); | ||||
| 				ltlNoteIdsRes = await this.redisForTimelines.xrevrange( | ||||
| 					ps.withFiles ? 'localTimelineWithFiles' : 'localTimeline', | ||||
| 					ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+', | ||||
| 					'-', | ||||
| 					'COUNT', limit); | ||||
| 				[htlNoteIdsRes, ltlNoteIdsRes] = await Promise.all([ | ||||
| 					this.redisForTimelines.xrevrange( | ||||
| 						ps.withFiles ? `homeTimelineWithFiles:${me.id}` : `homeTimeline:${me.id}`, | ||||
| 						ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+', | ||||
| 						'-', | ||||
| 						'COUNT', limit), | ||||
| 					this.redisForTimelines.xrevrange( | ||||
| 						ps.withFiles ? 'localTimelineWithFiles' : 'localTimeline', | ||||
| 						ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+', | ||||
| 						'-', | ||||
| 						'COUNT', limit), | ||||
| 				]); | ||||
| 			} | ||||
| 
 | ||||
| 			const htlNoteIds = htlNoteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue