aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-20 11:25:44 +0300
committerGravatar Vitaly Takmazov2021-08-20 11:25:44 +0300
commitbab10770a77f5f756a58c4ca6f19dd51e1b492ee (patch)
tree5461c0ad688c862f48adead0ee34a46d935d159a /src/main/java/com/juick/util
parentd24b3d5ab3d0c3b42f878658fa76aeaeaca4c5a1 (diff)
map NSFW tag to as:sensitive ActivityPub property
Diffstat (limited to 'src/main/java/com/juick/util')
-rw-r--r--src/main/java/com/juick/util/MessageUtils.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java
index 75a7fbf0..b0093b38 100644
--- a/src/main/java/com/juick/util/MessageUtils.java
+++ b/src/main/java/com/juick/util/MessageUtils.java
@@ -396,4 +396,8 @@ public class MessageUtils {
}
return result;
}
+
+ public static boolean isSensitive(Message msg) {
+ return msg.getTags().stream().anyMatch((t) -> t.getName().equals("NSFW"));
+ }
}