about summary refs log tree commit diff
path: root/src/lib/labeling/helpers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/labeling/helpers.ts')
-rw-r--r--src/lib/labeling/helpers.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/labeling/helpers.ts b/src/lib/labeling/helpers.ts
index 71ea43c08..baac0ed5a 100644
--- a/src/lib/labeling/helpers.ts
+++ b/src/lib/labeling/helpers.ts
@@ -137,12 +137,12 @@ export function getPostModeration(
 
   // warning cases
   if (postPref.pref === 'warn') {
-    if (postPref.desc.imagesOnly) {
+    if (postPref.desc.isAdultImagery) {
       return {
         avatar,
-        list: warnContent(postPref.desc.warning), // TODO make warnImages when there's time
-        thread: warnContent(postPref.desc.warning), // TODO make warnImages when there's time
-        view: warnContent(postPref.desc.warning), // TODO make warnImages when there's time
+        list: warnImages(postPref.desc.warning),
+        thread: warnImages(postPref.desc.warning),
+        view: warnImages(postPref.desc.warning),
       }
     }
     return {
@@ -401,10 +401,9 @@ function warnContent(reason: string) {
   }
 }
 
-// TODO
-// function warnImages(reason: string) {
-//   return {
-//     behavior: ModerationBehaviorCode.WarnImages,
-//     reason,
-//   }
-// }
+function warnImages(reason: string) {
+  return {
+    behavior: ModerationBehaviorCode.WarnImages,
+    reason,
+  }
+}