零卡 on Nostr: npub1e4lal…24gw4 是的~ 让我们进入紧张刺激的看源代码环节 if ...
npub1e4lalrknr9g708j6ugkmsmyucjlr9wln3w8rpjrx4nkesf5gavgqn24gw4 (npub1e4l…4gw4) 是的~ 让我们进入紧张刺激的看源代码环节
if (!ps.withReplies) {
const shouldShowReplyUserIds = [me.id, ...followees.filter(x => x.withReplies).map(x => x.followeeId)];
query.andWhere(new Brackets(qb => {
qb
.where('note.replyId IS NULL') // 返信ではない
.orWhere('note.replyId = :meId', { meId: me.id }) // reply my note
.orWhere(new Brackets(qb => {
qb // 返信だけど投稿者自身への返信
.where('note.replyId IS NOT NULL')
.andWhere('note.replyUserId = note.userId');
}))
.orWhere('note.userId IN (:...shouldShowReplyUserIds)', {
shouldShowReplyUserIds,
});
}));
}
if (!ps.withReplies) {
const shouldShowReplyUserIds = [me.id, ...followees.filter(x => x.withReplies).map(x => x.followeeId)];
query.andWhere(new Brackets(qb => {
qb
.where('note.replyId IS NULL') // 返信ではない
.orWhere('note.replyId = :meId', { meId: me.id }) // reply my note
.orWhere(new Brackets(qb => {
qb // 返信だけど投稿者自身への返信
.where('note.replyId IS NOT NULL')
.andWhere('note.replyUserId = note.userId');
}))
.orWhere('note.userId IN (:...shouldShowReplyUserIds)', {
shouldShowReplyUserIds,
});
}));
}