Files
2026-07-28 01:06:53 +03:00

159 lines
8.1 KiB
TypeScript

/* Metro module 11447; source: modules/guild_antiraid/GuildAntiRaidActionCreators.tsx; dependencies: [5, 1867, 8276, 661, 683, 4863, 9112, 3738, 507, 10927, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildAntiRaidConstantsModule from './GuildAntiRaidConstants.tsx'; /* Metro dependency 8276 */
function _fun87630(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:6, offset: 0x01fc5ef1, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_antiraid/GuildAntiRaidActionCreators.tsx');
exports.trackReportRaidViewed = trackReportRaidViewed;
exports.setGuildRaidAlerts = function() {
return _setGuildRaidAlerts.apply(this, arguments);
};
exports.setGuildIncidentActions = function() {
return _setGuildIncidentActions.apply(this, arguments);
};
exports.handleResolveRaid = function() {
return _handleResolveRaid.apply(this, arguments);
};
exports.handleReportRaid = function() {
return _handleReportRaid.apply(this, arguments);
};
function _setGuildRaidAlerts() { // fn#87631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:213, offset: 0x01fc6019, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun87633).apply(this, arguments);
function* _fun87633({features, id}, a1) { // fn#87633, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:274, offset: 0x01fc6056, size: 243 bytes, params: 3, frame: 18
if (true) {
var Set = global.Set;
var set = new Set(features);
var has = set.has;
var COMMUNITY = env2_8.COMMUNITY;
if (Reflect.apply(has, set, [COMMUNITY])) {
if (a1) {
set.delete(env2_8.RAID_ALERTS_DISABLED);
} else {
set.add(env2_8.RAID_ALERTS_DISABLED);
}
} else if (a1) {
set.add(env2_8.NON_COMMUNITY_RAID_ALERTS);
} else {
set.delete(env2_8.NON_COMMUNITY_RAID_ALERTS);
}
var value4 = env2_1(env2_2[6]);
yield value4.saveGuild(id, {features: set}, {throwErr: true});
}
}
}
function _setGuildIncidentActions() { // fn#87634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:557, offset: 0x01fc6149, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun87636).apply(this, arguments);
function* _fun87636(a0, a1, a2, a3) { // fn#87636, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:628, offset: 0x01fc6186, size: 235 bytes, params: 5, frame: 19
var r2;
var r6;
let value = a1;
const value2 = a2;
const value3 = a3;
if (true) {
var r3 = value || value2;
var value6 = null;
r2 = value6 != value3 ? value3 : env2_5;
r6 = r3 ? env2_1(env2_2[7])().add(r2, 'hours').toISOString() : value6;
var object = {};
object.invites_disabled_until = value ? r6 : value6;
object.dms_disabled_until = value2 ? r6 : value6;
object.lockdown_duration_hours = r3 ? r2 : value6;
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[8]).HTTP;
var put = HTTP.put;
var object2 = {};
object2.url = env2_7.GUILD_INCIDENT_ACTIONS(a0);
object2.body = object;
object2.rejectWithError = false;
yield Reflect.apply(put, HTTP, [object2]);
}
}
}
function _handleResolveRaid() { // fn#87637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:934, offset: 0x01fc6271, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun87639).apply(this, arguments);
function* _fun87639(a0, a1, a2) { // fn#87639, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:993, offset: 0x01fc62ae, size: 189 bytes, params: 4, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const guild = env2_4.getGuild(a0);
const value4 = null;
if (value4 == (value4 != guild ? env2_1(env2_2[9])(guild) : value4)) {
return value4;
}
const HTTP = env2_0(env2_2[8]).HTTP;
const post = HTTP.post;
const object = {};
object.url = env2_7.GUILD_INCIDENT_REPORT_FALSE_ALARM(a0);
object.body = {alert_message_id: a1, reason: a2};
object.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object]);
value = undefined;
if (false) {
}
return value;
}
}
function _handleReportRaid() { // fn#87640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1224, offset: 0x01fc636b, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun87642).apply(this, arguments);
function* _fun87642(a0) { // fn#87642, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1281, offset: 0x01fc63a8, size: 165 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const guild = env2_4.getGuild(a0);
const value4 = null;
if (value4 == (value4 != guild ? env2_1(env2_2[9])(guild) : value4)) {
return value4;
}
const HTTP = env2_0(env2_2[8]).HTTP;
const post = HTTP.post;
const object = {};
object.url = env2_7.GUILD_INCIDENT_REPORT_RAID(a0);
object.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object]);
value = undefined;
if (false) {
}
return value;
}
}
function trackReportRaidViewed(a0) { // fn#87643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11633:1579, offset: 0x01fc644d, size: 129 bytes, params: 2, frame: 19
var object;
var defaultImport;
var track;
var GUILD_RAID_REPORTED;
let value = a1;
const r6 = value !== undefined ? value : [];
if (r6.length !== 0) {
defaultImport = importDefault(dependencyMap[4]);
track = defaultImport.track;
GUILD_RAID_REPORTED = AnalyticEvents.GUILD_RAID_REPORTED;
object = {};
value = require(dependencyMap[5]);
copyDataProperties(object, value.collectGuildAnalyticsMetadata(a0), dependencyMap);
object['guild_id'] = a0;
object['raid_types'] = r6;
Reflect.apply(track, defaultImport, [GUILD_RAID_REPORTED, object]);
}
}
}
global.__d(_fun87630, 11447, [5, 1867, 8276, 661, 683, 4863, 9112, 3738, 507, 10927,
2]) /* metro module 11447, dependencies: [5, 1867, 8276, 661, 683, 4863, 9112, 3738, 507, 10927, 2] */;