decord/source/modules/media_channel/MediaPostSharePromptStore.tsx

64 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 7722
// Function ID: 7723
// Name: set
// Dependencies: [1933, 1218, 1372, 7723, 11, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 7722 (set)
import isSubscriptionGated from "isSubscriptionGated";
import fetchFingerprint from "fetchFingerprint";
import ensureGuildLoaded from "ensureGuildLoaded";
import { Store } from "initialize";
import set from "ensureGuildLoaded";
2026-07-23 10:11:24 +00:00
const require = arg1;
let set = new Set();
2026-07-29 08:29:29 +00:00
class MediaPostSharePromptStore extends Store {
}
const prototype = MediaPostSharePromptStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(fetchFingerprint, ensureGuildLoaded, isSubscriptionGated);
};
prototype["shouldDisplayPrompt"] = function shouldDisplayPrompt(id) {
return set.has(id);
};
MediaPostSharePromptStore.displayName = "MediaPostSharePromptStore";
const mediaPostSharePromptStore = new MediaPostSharePromptStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen() {
const set = new Set();
},
MESSAGE_CREATE: function handleMessageCreate(isPushNotification) {
if (!isPushNotification.isPushNotification) {
const message = isPushNotification.message;
const author = message.author;
let id1;
2026-07-23 10:11:24 +00:00
id = id.getId();
2026-07-29 08:29:29 +00:00
if (author != null) {
2026-07-20 16:05:17 +00:00
id1 = author.id;
}
if (id === id1) {
if (obj2.isFirstMessageIdInMediaPost(message.id, message.channel_id)) {
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(message.channel_id);
2026-07-20 16:05:17 +00:00
if (null != channel) {
if (null != channel.parent_id) {
if (channelGated.isChannelGated(channel.guild_id, channel.parent_id)) {
2026-07-29 08:29:29 +00:00
set.add(importDefault(11).castMessageIdAsChannelId(isPushNotification.message.id));
const obj = importDefault(11);
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
obj2 = require(7723) /* useIsFirstMessageInMediaPost */;
2026-07-20 16:05:17 +00:00
}
}
},
DISMISS_MEDIA_POST_SHARE_PROMPT: function handleDismissMediaPostSharePrompt(threadId) {
set.delete(threadId.threadId);
},
LOGOUT: function handleLogout() {
set.clear();
}
});
2026-07-29 08:29:29 +00:00
const result = set.fileFinishedImporting("modules/media_channel/MediaPostSharePromptStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default mediaPostSharePromptStore;