2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 9544
|
|
|
|
|
// Function ID: 9545
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: MessageUtils
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [2045, 1372, 5046, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
// Exports: canViewPotentiallyNSFWChannel, getGuildIdFromMessage
|
|
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 9544 (MessageUtils)
|
|
|
|
|
import AgeGateUtils from "AgeGateUtils" /* 5046 */;
|
|
|
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
2026-09-26 17:57:22 +00:00
|
|
|
import UserStore from "UserStore" /* 1372 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
};
|