fedimbed.bluesky: better dm detection for adult posts

This commit is contained in:
Cynthia Foxwell 2024-11-19 11:35:41 -07:00
parent 8382ff139d
commit f9b548452d

View file

@ -1,4 +1,4 @@
const {Message, PrivateChannel} = require("@projectdysnomia/dysnomia"); const {Message} = require("@projectdysnomia/dysnomia");
const fs = require("node:fs"); const fs = require("node:fs");
const httpSignature = require("@peertube/http-signature"); const httpSignature = require("@peertube/http-signature");
@ -474,7 +474,7 @@ async function bluesky(msg, url, spoiler = false) {
warnings.push(":warning: Post marked as hidden"); warnings.push(":warning: Post marked as hidden");
} }
if (adult) { if (adult) {
if (channelNsfw || channel instanceof PrivateChannel) { if (channelNsfw || !msg.guildID) {
warnings.push(`:warning: Post contains adult content: ${Array.from(new Set(tags)).join(", ")}`); warnings.push(`:warning: Post contains adult content: ${Array.from(new Set(tags)).join(", ")}`);
} else { } else {
return { return {