decord/source/modules/messages/MessageUtils.tsx
2026-08-31 15:47:37 +00:00

32 lines
1.2 KiB
TypeScript

// Module ID: 10128
// Function ID: 10129
// Name: canViewPotentiallyNSFWChannel
// Dependencies: [1387, 1922, 4699, 2]
// Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage
// Module 10128 (canViewPotentiallyNSFWChannel)
import shouldShowAgeGateForVoiceChannel from "shouldShowAgeGateForVoiceChannel" /* 4699 */;
import closure_2 from "ensureGuildLoaded" /* 1387 */;
import closure_3 from "mergeGuildAvatar" /* 1922 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/messages/MessageUtils.tsx");
export const canViewPotentiallyNSFWChannel = function canViewPotentiallyNSFWChannel(channel_id) {
currentUser = currentUser.getCurrentUser();
const channel = store.getChannel(channel_id);
let tmp3 = null != currentUser && null != channel;
if (tmp3) {
tmp3 = !shouldShowAgeGateForVoiceChannel.isChannelContentGated(channel);
const obj = shouldShowAgeGateForVoiceChannel;
}
return tmp3;
};
export const getGuildIdFromMessage = function getGuildIdFromMessage(channel_id) {
const channel = store.getChannel(channel_id.channel_id);
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
return guild_id;
};