File tree 4 files changed +10
-6
lines changed
4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
.env
2
2
assets /
3
3
fedify-hollo- * .tgz
4
+ * .jsonl
4
5
node_modules /
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ To be released.
21
21
- Added ` LOG_FILE ` environment variable to specify the file path to write
22
22
structured logs. The logs are written in JSON Lines format.
23
23
24
+ - Improved the performance of recipients gathering during sending activities.
25
+
24
26
[ #65 ] : https://github.com/dahlia/hollo/issues/65
25
27
26
28
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -180,8 +180,8 @@ federation
180
180
const owner = await db . query . accountOwners . findFirst ( {
181
181
where : eq ( accountOwners . handle , identifier ) ,
182
182
} ) ;
183
- if ( owner == null || cursor == null ) return null ;
184
- const offset = Number . parseInt ( cursor ) ;
183
+ if ( owner == null ) return null ;
184
+ const offset = cursor == null ? undefined : Number . parseInt ( cursor ) ;
185
185
if ( ! Number . isInteger ( offset ) ) return null ;
186
186
const followers = await db . query . accounts . findMany ( {
187
187
where : and (
@@ -203,17 +203,19 @@ federation
203
203
) ,
204
204
offset,
205
205
orderBy : accounts . id ,
206
- limit : 41 ,
206
+ limit : offset == null ? undefined : 41 ,
207
207
} ) ;
208
+ const items = offset == null ? followers : followers . slice ( 0 , 40 ) ;
208
209
return {
209
- items : followers . slice ( 0 , 40 ) . map ( ( f ) => ( {
210
+ items : items . map ( ( f ) => ( {
210
211
id : new URL ( f . iri ) ,
211
212
inboxId : new URL ( f . inboxUrl ) ,
212
213
endpoints : {
213
214
sharedInbox : f . sharedInboxUrl ? new URL ( f . sharedInboxUrl ) : null ,
214
215
} ,
215
216
} ) ) ,
216
- nextCursor : followers . length > 40 ? `${ offset + 40 } ` : null ,
217
+ nextCursor :
218
+ offset != null && followers . length > 40 ? `${ offset + 40 } ` : null ,
217
219
} ;
218
220
} ,
219
221
)
You can’t perform that action at this time.
0 commit comments