未実装のTLのRenoteクエリを実装 (#5343)
* users/notes includeMyRenotes * other renotes * fix target user in users/notes * users/notesからv10から未実装でありえないオプションを削除 * users/notesのincludeMyRenotesの説明を修正 * remove needless anonymous checks
This commit is contained in:
@@ -74,23 +74,7 @@ export const meta = {
|
||||
validator: $.optional.bool,
|
||||
default: true,
|
||||
desc: {
|
||||
'ja-JP': '自分の行ったRenoteを含めるかどうか'
|
||||
}
|
||||
},
|
||||
|
||||
includeRenotedMyNotes: {
|
||||
validator: $.optional.bool,
|
||||
default: true,
|
||||
desc: {
|
||||
'ja-JP': 'Renoteされた自分の投稿を含めるかどうか'
|
||||
}
|
||||
},
|
||||
|
||||
includeLocalRenotes: {
|
||||
validator: $.optional.bool,
|
||||
default: true,
|
||||
desc: {
|
||||
'ja-JP': 'Renoteされたローカルの投稿を含めるかどうか'
|
||||
'ja-JP': 'Renoteを含めるかどうか'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -177,23 +161,15 @@ export default define(meta, async (ps, me) => {
|
||||
query.andWhere('note.replyId IS NULL');
|
||||
}
|
||||
|
||||
/* TODO
|
||||
if (ps.includeMyRenotes === false) {
|
||||
query.$and.push({
|
||||
$or: [{
|
||||
userId: { $ne: user.id }
|
||||
}, {
|
||||
renoteId: null
|
||||
}, {
|
||||
text: { $ne: null }
|
||||
}, {
|
||||
fileIds: { $ne: [] }
|
||||
}, {
|
||||
poll: { $ne: null }
|
||||
}]
|
||||
});
|
||||
query.andWhere(new Brackets(qb => {
|
||||
qb.orWhere('note.userId != :userId', { userId: user.id });
|
||||
qb.orWhere('note.renoteId IS NULL');
|
||||
qb.orWhere('note.text IS NOT NULL');
|
||||
qb.orWhere('note.fileIds != \'{}\'');
|
||||
qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)');
|
||||
}));
|
||||
}
|
||||
*/
|
||||
|
||||
//#endregion
|
||||
|
||||
|
Reference in New Issue
Block a user