refactor: constrain type
This commit is contained in:
parent
6063f4d7ab
commit
065b889ccb
1 changed files with 5 additions and 5 deletions
|
@ -132,11 +132,11 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
blockerIds.includes(n.notifierId))
|
blockerIds.includes(n.notifierId))
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (
|
if (ps.directOnly) {
|
||||||
ps.directOnly &&
|
filtered = filtered.filter(
|
||||||
ps.includeTypes?.every((t) => ["mention", "reply"].includes(t))
|
({ entityId, type }) =>
|
||||||
) {
|
entityId && ["mention", "reply"].includes(type),
|
||||||
filtered = filtered.filter(({ entityId }) => !!entityId);
|
);
|
||||||
let notes = await client
|
let notes = await client
|
||||||
.execute(
|
.execute(
|
||||||
prepared.note.select.byIds,
|
prepared.note.select.byIds,
|
||||||
|
|
Loading…
Reference in a new issue