enhance(server): Improve user block (#7640)
* enhance(server): Improve user block
* Update CHANGELOG.md
* ユーザーリスト対応
* 相手から見れなくなるように
* Update 1629004542760-chart-reindex.ts
2365761ba5 (commitcomment-54919821)
* update test
* add test
* add todos
* Update 1629004542760-chart-reindex.ts
This commit is contained in:
15
src/misc/is-blocker-user-related.ts
Normal file
15
src/misc/is-blocker-user-related.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export function isBlockerUserRelated(note: any, blockerUserIds: Set<string>): boolean {
|
||||
if (blockerUserIds.has(note.userId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (note.reply != null && blockerUserIds.has(note.reply.userId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (note.renote != null && blockerUserIds.has(note.renote.userId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
Reference in New Issue
Block a user