From bab10770a77f5f756a58c4ca6f19dd51e1b492ee Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 Aug 2021 11:25:44 +0300 Subject: map NSFW tag to as:sensitive ActivityPub property --- src/main/java/com/juick/util/MessageUtils.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/com/juick/util') 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")); + } } -- cgit v1.2.3