parent
2a9de356db
commit
1d234e10bd
|
@ -66,7 +66,7 @@ export default define(meta, async (ps, user) => {
|
||||||
}))
|
}))
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (user) generateVisibilityQuery(query, user);
|
generateVisibilityQuery(query, user);
|
||||||
if (user) generateMuteQuery(query, user);
|
if (user) generateMuteQuery(query, user);
|
||||||
|
|
||||||
const notes = await query.take(ps.limit!).getMany();
|
const notes = await query.take(ps.limit!).getMany();
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default define(meta, async (ps, user) => {
|
||||||
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)')
|
.andWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)')
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (user) generateVisibilityQuery(query, user);
|
generateVisibilityQuery(query, user);
|
||||||
if (user) generateMuteQuery(query, user);
|
if (user) generateMuteQuery(query, user);
|
||||||
|
|
||||||
if (ps.withFiles) {
|
if (ps.withFiles) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default define(meta, async (ps, user) => {
|
||||||
.andWhere(`note.renoteId = :renoteId`, { renoteId: note.id })
|
.andWhere(`note.renoteId = :renoteId`, { renoteId: note.id })
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (user) generateVisibilityQuery(query, user);
|
generateVisibilityQuery(query, user);
|
||||||
if (user) generateMuteQuery(query, user);
|
if (user) generateMuteQuery(query, user);
|
||||||
|
|
||||||
const renotes = await query.take(ps.limit!).getMany();
|
const renotes = await query.take(ps.limit!).getMany();
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default define(meta, async (ps, user) => {
|
||||||
.andWhere('note.replyId = :replyId', { replyId: ps.noteId })
|
.andWhere('note.replyId = :replyId', { replyId: ps.noteId })
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (user) generateVisibilityQuery(query, user);
|
generateVisibilityQuery(query, user);
|
||||||
if (user) generateMuteQuery(query, user);
|
if (user) generateMuteQuery(query, user);
|
||||||
|
|
||||||
const timeline = await query.take(ps.limit!).getMany();
|
const timeline = await query.take(ps.limit!).getMany();
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default define(meta, async (ps, me) => {
|
||||||
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId)
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (me) generateVisibilityQuery(query, me);
|
generateVisibilityQuery(query, me);
|
||||||
if (me) generateMuteQuery(query, me);
|
if (me) generateMuteQuery(query, me);
|
||||||
|
|
||||||
if (ps.tag) {
|
if (ps.tag) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default define(meta, async (ps, me) => {
|
||||||
.andWhere('note.userId = :userId', { userId: user.id })
|
.andWhere('note.userId = :userId', { userId: user.id })
|
||||||
.leftJoinAndSelect('note.user', 'user');
|
.leftJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
if (me) generateVisibilityQuery(query, me);
|
generateVisibilityQuery(query, me);
|
||||||
if (me) generateMuteQuery(query, me, user);
|
if (me) generateMuteQuery(query, me, user);
|
||||||
|
|
||||||
if (ps.withFiles) {
|
if (ps.withFiles) {
|
||||||
|
|
Loading…
Reference in New Issue