diff options
author | Vitaly Takmazov | 2021-08-20 11:25:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-20 11:25:44 +0300 |
commit | bab10770a77f5f756a58c4ca6f19dd51e1b492ee (patch) | |
tree | 5461c0ad688c862f48adead0ee34a46d935d159a /src/main/java/com/juick/util | |
parent | d24b3d5ab3d0c3b42f878658fa76aeaeaca4c5a1 (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.java | 4 |
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")); + } } |