decord/source/actions/CallActionCreators.tsx

121 lines
4.1 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 9292
// Function ID: 9293
// Dependencies: [1391, 3998, 1922, 676, 5170, 530, 698, 4683, 1236, 9293, 9284, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-13 07:00:46 +00:00
// Module 9292
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
2026-08-11 06:20:06 +00:00
import markAllUserIdListsStale from "markAllUserIdListsStale";
2026-07-29 08:29:29 +00:00
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
let c9;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ Endpoints: closure_6, AnalyticEvents: error, ChannelTypesSets: metroImportAll, ChannelTypes: c9 } = ME);
let result = require("mergeGuildAvatar").fileFinishedImporting("actions/CallActionCreators.tsx");
2026-07-23 10:11:24 +00:00
export default {
2026-07-29 08:29:29 +00:00
call(id, c1) {
let self = this;
self = this;
const importDefault = id;
const dependencyMap = c1;
let ensureGuildLoaded = arg2;
2026-07-20 16:05:17 +00:00
const blocked = arg3;
const user = arg4;
if (null != arg3) {
if (!blocked.isBlocked(arg3)) {
2026-07-29 08:29:29 +00:00
const _require = user.getUser(arg3);
const HTTP = _require(530).HTTP;
let obj = { url: null, oldFormErrors: true, rejectWithError: true };
obj[0] = self.CALL(id);
2026-07-20 16:05:17 +00:00
const value = HTTP.get(obj);
value.then((body) => {
2026-07-29 08:29:29 +00:00
let ringable = ensureGuildLoaded;
if (ensureGuildLoaded) {
2026-07-20 16:05:17 +00:00
ringable = body.body.ringable;
}
2026-08-13 07:00:46 +00:00
const voiceChannel = id(5170).selectVoiceChannel(id, dependencyMap);
2026-07-29 08:29:29 +00:00
if (ringable) {
self.ring(tmp2);
}
if (callback != null) {
callback(tmp2);
}
2026-07-20 16:05:17 +00:00
}, () => {
2026-07-29 08:29:29 +00:00
let obj = id(698);
obj.track(outer1_7.OPEN_POPOUT, { type: "Not Friend", source: "Call" });
obj = { title: null, body: null, confirmText: null, cancelText: null, onConfirm: null };
const intl = lib(1236).intl;
obj[0] = intl.string(lib(1236).t.My50nf);
const intl2 = lib(1236).intl;
2026-07-20 16:05:17 +00:00
let str = "";
2026-07-29 08:29:29 +00:00
if (null != lib) {
str = lib.username;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = intl2.format(lib(1236).t.IdKo2z, { username: str });
const intl3 = tmp3(1236).intl;
obj[2] = intl3.string(lib(1236).t["PMsq/b"]);
const intl4 = tmp3(1236).intl;
obj[3] = intl4.string(lib(1236).t.BddRzS);
obj[4] = function onConfirm() {
let obj = outer1_1(outer1_2[9]);
2026-08-11 06:20:06 +00:00
obj = { userId: markAllUserIdListsStale, context: { location: "Call" } };
2026-07-20 16:05:17 +00:00
obj.addRelationship(obj);
};
2026-08-13 07:00:46 +00:00
id(4683).show(obj);
2026-07-20 16:05:17 +00:00
});
}
} else {
2026-08-13 07:00:46 +00:00
obj = importDefault(5170);
2026-07-29 08:29:29 +00:00
let voiceChannel = obj.selectVoiceChannel(id, c1);
if (arg2) {
self.ring(id);
}
if (arg4 != null) {
arg4(id);
}
2026-07-20 16:05:17 +00:00
}
},
ring(channelId, items, gdm_invite) {
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channelId);
2026-07-20 16:05:17 +00:00
if (null != channel) {
2026-08-13 07:00:46 +00:00
let obj = require(9284) /* useCanRingToGuildVoiceChannel */;
2026-07-20 16:05:17 +00:00
const CALLABLE = constants.CALLABLE;
const result = obj.canRingUsersInChannel(channel);
if (result) {
2026-07-29 08:29:29 +00:00
const HTTP = tmp3(530).HTTP;
obj = { url: null, body: null, oldFormErrors: true, rejectWithError: true };
obj[0] = closure_6.CALL_RING(channelId);
obj = { recipients: null, analytics_location: null };
obj[0] = items;
obj[1] = gdm_invite;
obj[1] = obj;
2026-07-20 16:05:17 +00:00
HTTP.post(obj);
2026-07-29 08:29:29 +00:00
if (tmp14) {
let obj1 = { type: "GUILD_LOCAL_RING_START", ringing: null, guildId: null };
obj1[1] = items;
obj1[2] = channel.guild_id;
importDefault(709).dispatch(obj1);
const obj6 = importDefault(709);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
} else if (tmp7) {
obj1 = importDefault(709);
const obj2 = { type: "CALL_ENQUEUE_RING", channelId: null, recipients: null };
obj2[1] = channelId;
obj2[2] = items;
2026-07-20 16:05:17 +00:00
obj1.dispatch(obj2);
}
2026-07-29 08:29:29 +00:00
tmp3 = require;
2026-07-20 16:05:17 +00:00
}
},
stopRinging(channelId, items) {
2026-07-29 08:29:29 +00:00
const HTTP = require(530) /* sendRequest */.HTTP;
2026-07-23 10:11:24 +00:00
obj = { url: closure_6.CALL_STOP_RINGING(channelId), body: obj, oldFormErrors: true, rejectWithError: true };
2026-07-20 16:05:17 +00:00
obj = { recipients: items };
return HTTP.post(obj);
}
};