decord/alpha/source/lib/InviteQueue.tsx

65 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 8748
// Function ID: 8749
// Name: InviteQueue
2026-10-09 10:00:15 +00:00
// Dependencies: [2064, 1102, 7736, 3, 7172, 7008, 2]
2026-07-23 10:11:24 +00:00
2026-10-09 10:00:15 +00:00
// Module 8748 (InviteQueue)
import LoggerDefault from "Logger" /* 3 */;
2026-10-03 08:58:59 +00:00
import DurationsDefault from "Durations" /* 1102 */;
2026-10-09 10:00:15 +00:00
import MessageActionCreatorsDefault from "MessageActionCreators" /* 7172 */;
import ChannelStore from "ChannelStore" /* 2064 */;
import Queue from "Queue" /* 7736 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
let dependencyMap;
2026-07-20 16:05:17 +00:00
let sum = DurationsDefault.Millis.SECOND + 10;
2026-07-29 08:29:29 +00:00
let c3 = sum;
const InvitePropertiesType = { GROUP_DM: 0, [0]: "GROUP_DM", USER: 1, [1]: "USER", CHANNEL: 2, [2]: "CHANNEL" };
2026-10-03 08:58:59 +00:00
class InviteQueue extends Queue {
2026-07-29 08:29:29 +00:00
constructor() {
2026-10-03 08:58:59 +00:00
const tmp2 = LoggerDefault;
const tmp22 = new tmp2("InviteQueue");
const tmp3 = new tmp(tmp22, c3, tmp2);
return tmp3;
}
_sendInvite(channel, inviteKey, _location, inviteAnalyticsMetadata, sum) {
let closure_0 = sum;
const obj = MessageActionCreatorsDefault;
const sendInviteResult = obj.sendInvite(channel.id, inviteKey, _location, inviteAnalyticsMetadata);
sendInviteResult.then(() => closure_0(null, true), () => closure_0(null, false));
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const prototype = InviteQueue.prototype;
function drain(location, sum) {
const self = this;
2026-07-29 08:29:29 +00:00
dependencyMap = location;
const _location = location.location;
const inviteAnalyticsMetadata = location.inviteAnalyticsMetadata;
const type = location.type;
if (self.GROUP_DM !== type) {
2026-10-03 08:58:59 +00:00
if (self.CHANNEL !== type) {
if (self.USER === type) {
2026-10-09 10:00:15 +00:00
const obj = inviteAnalyticsMetadata(7008);
2026-10-03 08:58:59 +00:00
const ensurePrivateChannelResult = obj.ensurePrivateChannel(location.user.id);
ensurePrivateChannelResult.then((result) => {
const channel = ChannelStore.getChannel(result);
2026-07-29 08:29:29 +00:00
if (null != channel) {
self._sendInvite(channel, _location.inviteKey, _location, inviteAnalyticsMetadata, sum);
} else {
sum(null, false);
}
}, () => sum(null, false));
}
}
}
self._sendInvite(location.channel, location.inviteKey, _location, inviteAnalyticsMetadata, sum);
}
prototype["drain"] = drain;
2026-10-03 08:58:59 +00:00
const tmp5 = new LoggerDefault("InviteQueue");
const drain1 = new drain(tmp5, sum, tmp, prototype, this, InviteQueue, drain, dependencyMap, this);
const result = size.fileFinishedImporting("lib/InviteQueue.tsx");
2026-07-20 16:05:17 +00:00
export default drain1;
export { InvitePropertiesType };