Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
58 lines
2.3 KiB
TypeScript
58 lines
2.3 KiB
TypeScript
// Module ID: 10242
|
|
// Function ID: 10243
|
|
// Name: InviteQueue
|
|
// Dependencies: [2044, 1091, 8164, 3, 7786, 4842, 2]
|
|
|
|
// Module 10242 (InviteQueue)
|
|
import LoggerDefault from "Logger" /* 3 */;
|
|
import DurationsDefault from "Durations" /* 1091 */;
|
|
import MessageActionCreatorsDefault from "MessageActionCreators" /* 7786 */;
|
|
import ChannelStore from "ChannelStore" /* 2044 */;
|
|
import Queue from "Queue" /* 8164 */;
|
|
|
|
let sum = DurationsDefault.Millis.SECOND + 10;
|
|
let c3 = sum;
|
|
const InvitePropertiesType = { GROUP_DM: 0, [0]: "GROUP_DM", USER: 1, [1]: "USER", CHANNEL: 2, [2]: "CHANNEL" };
|
|
class InviteQueue extends tmp4 {
|
|
constructor() {
|
|
tmp2 = closure_0(closure_1[3]);
|
|
tmp21 = new tmp2("InviteQueue");
|
|
tmp1 = new tmp(tmp21, closure_3, tmp2);
|
|
return tmp1;
|
|
}
|
|
}
|
|
const prototype = InviteQueue.prototype;
|
|
prototype["_sendInvite"] = function _sendInvite(channel, inviteKey, _location, inviteAnalyticsMetadata, sum) {
|
|
MessageActionCreatorsDefault.sendInvite(channel.id, inviteKey, _location, inviteAnalyticsMetadata).then(() => sum(null, true), () => sum(null, false));
|
|
};
|
|
function drain(location, sum) {
|
|
const self = this;
|
|
dependencyMap = location;
|
|
const _location = location.location;
|
|
const inviteAnalyticsMetadata = location.inviteAnalyticsMetadata;
|
|
const type = location.type;
|
|
if (self.GROUP_DM !== type) {
|
|
if (tmp.CHANNEL !== type) {
|
|
if (tmp.USER === type) {
|
|
const obj = inviteAnalyticsMetadata(4842);
|
|
inviteAnalyticsMetadata(4842).ensurePrivateChannel(location.user.id).then((result) => {
|
|
const channel = ChannelStore.getChannel(result);
|
|
if (null != channel) {
|
|
self._sendInvite(channel, _location.inviteKey, _location, inviteAnalyticsMetadata, sum);
|
|
} else {
|
|
sum(null, false);
|
|
}
|
|
}, () => sum(null, false));
|
|
const ensurePrivateChannelResult = inviteAnalyticsMetadata(4842).ensurePrivateChannel(location.user.id);
|
|
}
|
|
}
|
|
}
|
|
self._sendInvite(location.channel, location.inviteKey, _location, inviteAnalyticsMetadata, sum);
|
|
}
|
|
prototype["drain"] = drain;
|
|
const drain1 = new drain(new LoggerDefault("InviteQueue"), sum, tmp, prototype, new.target, InviteQueue, drain, dependencyMap, new.target);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("lib/InviteQueue.tsx");
|
|
|
|
export default drain1;
|
|
export { InvitePropertiesType };
|