mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
fix(backend): users/notesでsinceId指定時にデータベースにフォールバックするように修正
This commit is contained in:
parent
04971ca565
commit
7473b2854f
1 changed files with 65 additions and 61 deletions
|
@ -72,6 +72,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
|
const isRangeSpecified = (ps.sinceId != null || ps.sinceDate != null) && (ps.untilId != null || ps.untilDate != null);
|
||||||
|
|
||||||
|
if (isRangeSpecified || !(ps.sinceId != null || ps.sinceDate != null)) {
|
||||||
const [
|
const [
|
||||||
userIdsWhoMeMuting,
|
userIdsWhoMeMuting,
|
||||||
] = me ? await Promise.all([
|
] = me ? await Promise.all([
|
||||||
|
@ -148,6 +151,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
return await this.noteEntityService.packMany(timeline, me);
|
return await this.noteEntityService.packMany(timeline, me);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fallback to database
|
// fallback to database
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue