decord/source/modules/messages/MessageUtils.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

32 lines
1.2 KiB
TypeScript

// Module ID: 10013
// Function ID: 10014
// Name: canViewPotentiallyNSFWChannel
// Dependencies: [1386, 1921, 4739, 2]
// Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage
// Module 10013 (canViewPotentiallyNSFWChannel)
import shouldShowAgeGateForVoiceChannel from "shouldShowAgeGateForVoiceChannel" /* 4739 */;
import closure_2 from "ensureGuildLoaded" /* 1386 */;
import closure_3 from "mergeGuildAvatar" /* 1921 */;
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;
};