decord/source/modules/media_channel/MediaPostSharePromptStore.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

67 lines
2.4 KiB
TypeScript

// Module ID: 7873
// Function ID: 7874
// Name: set
// Dependencies: [1982, 1215, 1386, 7874, 11, 586, 706, 2]
// Module 7873 (set)
import DISCORD_EPOCHDefault from "DISCORD_EPOCH" /* 11 */;
import initializeDefault from "initialize" /* 586 */;
import dispatcherDefault from "dispatcher" /* 706 */;
import useIsFirstMessageInMediaPost from "useIsFirstMessageInMediaPost" /* 7874 */;
import closure_3 from "isSubscriptionGated" /* 1982 */;
import closure_4 from "fetchFingerprint" /* 1215 */;
import closure_5 from "ensureGuildLoaded" /* 1386 */;
import set from "set" /* 2 */;
require = arg1;
let set = new Set();
const Store = initializeDefault.Store;
class MediaPostSharePromptStore extends Store {
}
const prototype = MediaPostSharePromptStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(closure_4, closure_5, closure_3);
};
prototype["shouldDisplayPrompt"] = function shouldDisplayPrompt(id) {
return set.has(id);
};
MediaPostSharePromptStore.displayName = "MediaPostSharePromptStore";
const mediaPostSharePromptStore = new MediaPostSharePromptStore(dispatcherDefault, {
CONNECTION_OPEN: function handleConnectionOpen() {
set = new Set();
},
MESSAGE_CREATE: function handleMessageCreate(isPushNotification) {
if (!isPushNotification.isPushNotification) {
const message = isPushNotification.message;
const author = message.author;
let id1;
id = id.getId();
if (author != null) {
id1 = author.id;
}
if (id === id1) {
if (obj2.isFirstMessageIdInMediaPost(message.id, message.channel_id)) {
channel = channel.getChannel(message.channel_id);
if (null != channel) {
if (null != channel.parent_id) {
if (channelGated.isChannelGated(channel.guild_id, channel.parent_id)) {
set.add(DISCORD_EPOCHDefault.castMessageIdAsChannelId(isPushNotification.message.id));
const obj = DISCORD_EPOCHDefault;
}
}
}
}
obj2 = useIsFirstMessageInMediaPost;
}
}
},
DISMISS_MEDIA_POST_SHARE_PROMPT: function handleDismissMediaPostSharePrompt(threadId) {
set.delete(threadId.threadId);
},
LOGOUT: function handleLogout() {
set.clear();
}
});
const result = set.fileFinishedImporting("modules/media_channel/MediaPostSharePromptStore.tsx");
export default mediaPostSharePromptStore;