17 lines
596 B
TypeScript
17 lines
596 B
TypeScript
// Metro module 10248 (f10249).
|
|
import ChannelStore from "../../stores/ChannelStore";
|
|
import UserStore from "../../stores/UserStore";
|
|
import { isChannelContentGated } from "../age_gate/AgeGateUtils";
|
|
export function canViewPotentiallyNSFWChannel(a0) {
|
|
const currentUser = UserStore.getCurrentUser();
|
|
const channel = ChannelStore.getChannel(a0);
|
|
return currentUser != null && channel != null && !isChannelContentGated(channel);
|
|
}
|
|
export function getGuildIdFromMessage(a0) {
|
|
let r9 = ChannelStore.getChannel(a0.channel_id)?.guild_id;
|
|
if (r9 == null) {
|
|
r9 = void 0;
|
|
}
|
|
return r9;
|
|
}
|