mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
enforce DM visibility in generateVisibilityQuery
This commit is contained in:
parent
8cf6f32869
commit
27c27529f6
1 changed files with 9 additions and 7 deletions
|
@ -157,15 +157,17 @@ export class QueryService {
|
|||
qb
|
||||
// My post
|
||||
.orWhere(':meId = note.userId')
|
||||
// Reply to me
|
||||
.orWhere(':meId = note.replyUserId')
|
||||
// DM to me
|
||||
// Visible to me
|
||||
.orWhere(':meIdAsList <@ note.visibleUserIds')
|
||||
// Followers-only post
|
||||
.orWhere(new Brackets(qb => qb
|
||||
.andWhere(new Brackets(qbb => this
|
||||
// Following author
|
||||
.orFollowingUser(qbb, ':meId', 'note.userId')
|
||||
// Mentions me
|
||||
.orWhere(':meIdAsList <@ note.mentions')
|
||||
// Followers-only post
|
||||
.orWhere(new Brackets(qb => this
|
||||
.andFollowingUser(qb, ':meId', 'note.userId')
|
||||
// Reply to me
|
||||
.orWhere(':meId = note.replyUserId')))
|
||||
.andWhere('note.visibility = \'followers\'')));
|
||||
|
||||
q.setParameters({ meId: me.id, meIdAsList: [me.id] });
|
||||
|
|
Loading…
Add table
Reference in a new issue