summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/is-blocker-user-related.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/misc/is-blocker-user-related.ts b/src/misc/is-blocker-user-related.ts
new file mode 100644
index 0000000000..8c0ebfad9b
--- /dev/null
+++ b/src/misc/is-blocker-user-related.ts
@@ -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;
+}