// Module ID: 9533 // Function ID: 9534 // Name: MessageUtils // Dependencies: [2044, 1372, 5039, 2] // Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage // Module 9533 (MessageUtils) import AgeGateUtils from "AgeGateUtils" /* 5039 */; import ChannelStore from "ChannelStore" /* 2044 */; import UserStore from "UserStore" /* 1372 */; require = fn; const size = fn(2); const result = size.fileFinishedImporting("modules/messages/MessageUtils.tsx"); export const canViewPotentiallyNSFWChannel = function canViewPotentiallyNSFWChannel(channel_id) { const currentUser = UserStore.getCurrentUser(); const channel = ChannelStore.getChannel(channel_id); let tmp3 = null != currentUser && null != channel; if (tmp3) { tmp3 = !AgeGateUtils.isChannelContentGated(channel); } return tmp3; }; export const getGuildIdFromMessage = function getGuildIdFromMessage(channel_id) { const channel = ChannelStore.getChannel(channel_id.channel_id); let guild_id; if (channel != null) { guild_id = channel.guild_id; } return guild_id; };