decord/source/modules/messages/MessageUtils.tsx

36 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 10253
// Function ID: 79176
2026-07-20 16:05:17 +00:00
// Name: canViewPotentiallyNSFWChannel
2026-07-23 10:11:24 +00:00
// Dependencies: [1348, 1849, 4345, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage
2026-07-24 07:16:23 +00:00
// Module 10253 (canViewPotentiallyNSFWChannel)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_3 from "_isNativeReflectConstruct";
const require = arg1;
const result = require("shouldAgeVerifyForAgeGate").fileFinishedImporting("modules/messages/MessageUtils.tsx");
2026-07-20 16:05:17 +00:00
export const canViewPotentiallyNSFWChannel = function canViewPotentiallyNSFWChannel(channel_id) {
2026-07-23 10:11:24 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
const channel = store.getChannel(channel_id);
let tmp3 = null != currentUser && null != channel;
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = !require(4345) /* shouldAgeVerifyForAgeGate */.isChannelContentGated(channel);
const obj = require(4345) /* shouldAgeVerifyForAgeGate */;
2026-07-20 16:05:17 +00:00
}
return tmp3;
};
export const getGuildIdFromMessage = function getGuildIdFromMessage(channel_id) {
const channel = store.getChannel(channel_id.channel_id);
let guild_id;
if (null != channel) {
guild_id = channel.guild_id;
}
let tmp3;
if (null != guild_id) {
tmp3 = guild_id;
}
return tmp3;
};