625 lines
35 KiB
TypeScript
625 lines
35 KiB
TypeScript
/* Metro module 9112; source: modules/guild_settings/GuildSettingsActionCreators.tsx; dependencies: [5, 1937, 3785, 1226, 1945, 1867, 9113, 661, 3, 694, 507, 6931, 9118, 7618, 7615, 5046, 480, 3967, 1244, 1230, 6607, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import ImpersonateStore from '../impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */
|
|
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import LurkingStore from '../lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */
|
|
import TrackedHTTPUtils from '../../utils/TrackedHTTPUtils.tsx'; /* Metro dependency 5046 */
|
|
import GuildTemplateTooltipActionCreators from '../guild_templates/GuildTemplateTooltipActionCreators.tsx'; /* Metro dependency 6931 */
|
|
import InlineUploader from '../../lib/uploader_inline/InlineUploader.tsx'; /* Metro dependency 7618 */
|
|
import GuildSettingsStore from './GuildSettingsStore.tsx'; /* Metro dependency 9113 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as AnalyticsUtilsModule from '../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
|
|
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as SafetyScannedUploadSurfacesModule from '../../lib/uploader_inline/safetyScannedUploadSurfaces.tsx'; /* Metro dependency 7615 */
|
|
|
|
function _fun71271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6, offset: 0x01d1b83f, size: 667 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_10 = value.Endpoints;
|
|
value.Layers;
|
|
const env0_11 = value.GuildSettingsSubsections;
|
|
const env0_12 = value.GuildSettingsSections;
|
|
const env0_13 = value.GuildFeatures;
|
|
const env0_14 = value.Routes;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('GuildSettingsActionCreators');
|
|
object = {init: init_71272, open: function(a0, a1, a2, a3) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
return a3(_fun71274)();
|
|
}, close: close_71276, saveRouteStack: saveRouteStack, setSection: setSection_71278, setSearchQuery: setSearchQuery,
|
|
selectRole: selectRole, updateEmbed: updateEmbed, updateMFALevel: updateMFALevel, updateIcon: updateIcon,
|
|
cancelChanges: cancelChanges, updateGuild: updateGuild, updateGuildProfile: updateGuildProfile,
|
|
saveGuild: saveGuild, updateGuildModeration: updateGuildModeration, transferOwnership: transferOwnership,
|
|
sendTransferOwnershipPincode: sendTransferOwnershipPincode, deleteGuild: deleteGuild_71298,
|
|
leaveGuild: leaveGuild, updateMemberRoles: updateMemberRoles, bulkAddMemberRoles: bulkAddMemberRoles,
|
|
enableIntegration: function(a0, a1, a2) {
|
|
var HTTP = require(dependencyMap[10]).HTTP;
|
|
var object = {};
|
|
object.url = Endpoints.GUILD_INTEGRATIONS(a0);
|
|
object.body = {type: a1, id: a2};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
return HTTP.post(object);
|
|
}, disableIntegration: function(a0, a1) {
|
|
var HTTP = require(dependencyMap[10]).HTTP;
|
|
var object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object.url = Endpoints.GUILD_INTEGRATION(a0, a1);
|
|
return HTTP.del(object);
|
|
}, updateIntegration: function(a0, a1, a2, a3, a4) {
|
|
var HTTP = require(dependencyMap[10]).HTTP;
|
|
var object = {};
|
|
object.url = Endpoints.GUILD_INTEGRATION(a0, a1);
|
|
object.body = {expire_behavior: a2, expire_grace_period: a3, enable_emoticons: a4};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
return HTTP.patch(object);
|
|
}, syncIntegration: function(a0, a1) {
|
|
var HTTP = require(dependencyMap[10]).HTTP;
|
|
var object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object.url = Endpoints.GUILD_INTEGRATION_SYNC(a0, a1);
|
|
HTTP.post(object);
|
|
}, migratePinPermission: migratePinPermission, migrateSlowmodePermission: migrateSlowmodePermission,
|
|
migratePermissions: migratePermissions};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/GuildSettingsActionCreators.tsx');
|
|
exports.default = object;
|
|
function init_71272(a0, a1, a2, a3) { // fn#71272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:334, offset: 0x01d1bada, size: 77 bytes, params: 5, frame: 13
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_INIT', guildId: a0,
|
|
section: a1, subsection: a3, location: a2});
|
|
}
|
|
|
|
function open_71273(a0, a1, a2, a3) { // fn#71273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:445, offset: 0x01d1bb27, size: 57 bytes, params: 5, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return a3(_fun71275)();
|
|
function _fun71274() { // fn#71274, offset: 0x01d1bb60, size: 11 bytes, params: 1, frame: 1
|
|
return _fun71275;
|
|
}
|
|
|
|
function* _fun71275() { // fn#71275, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:459, offset: 0x01d1bb6b, size: 304 bytes, params: 1, frame: 21
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_8;
|
|
var guild = binding.getGuild(env1_0);
|
|
if (guild != null && guild.features.has(env2_13.COMMUNITY)) {
|
|
binding = env1_1;
|
|
env1_1 = binding === env2_12.GUILD_AUTOMOD ? env2_12.SAFETY : env1_1;
|
|
binding = env1_1;
|
|
if (binding === env2_12.MEMBER_VERIFICATION) {
|
|
env1_1 = env2_12.SAFETY;
|
|
SAFETY_DM_AND_SPAM_PROTECTION = env2_11.SAFETY_DM_AND_SPAM_PROTECTION;
|
|
}
|
|
}
|
|
binding = env2_16;
|
|
binding.init(env1_0, env1_1, env1_2, SAFETY_DM_AND_SPAM_PROTECTION);
|
|
if (env1_1 != null) {
|
|
binding = env2_16;
|
|
binding.setSection(env1_1, SAFETY_DM_AND_SPAM_PROTECTION);
|
|
}
|
|
value = env2_1(env2_2[9]);
|
|
value.dispatch({type: 'GUILD_SETTINGS_OPEN', guildId: env1_0, section: env1_1,
|
|
subsection: SAFETY_DM_AND_SPAM_PROTECTION});
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function close_71276() { // fn#71276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:788, offset: 0x01d1bc9b, size: 47 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_CLOSE'});
|
|
}
|
|
|
|
function saveRouteStack(a0) { // fn#71277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:845, offset: 0x01d1bcca, size: 56 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SAVE_ROUTE_STACK',
|
|
state: a0});
|
|
}
|
|
|
|
function setSection_71278(a0, a1) { // fn#71278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:931, offset: 0x01d1bd02, size: 222 bytes, params: 3, frame: 15
|
|
var r2;
|
|
var r1;
|
|
var r3;
|
|
var r4;
|
|
var guild;
|
|
var SAFETY;
|
|
let value = a0;
|
|
const value2 = a1;
|
|
const guildId = GuildSettingsStore.getGuildId();
|
|
if (guildId != null) {
|
|
guild = GuildStore.getGuild(guildId);
|
|
r2 = guild != null && guild.features.has(GuildFeatures.COMMUNITY);
|
|
if (r2) {
|
|
if (value !== GuildSettingsSections.GUILD_AUTOMOD) {
|
|
r1 = value2;
|
|
r2 = value;
|
|
} else {
|
|
SAFETY = GuildSettingsSections.SAFETY;
|
|
r1 = GuildSettingsSubsections.SAFETY_AUTOMOD;
|
|
r2 = SAFETY;
|
|
}
|
|
if (r2 === GuildSettingsSections.MEMBER_VERIFICATION) {
|
|
SAFETY = GuildSettingsSections.SAFETY;
|
|
r1 = GuildSettingsSubsections.SAFETY_DM_AND_SPAM_PROTECTION;
|
|
r2 = SAFETY;
|
|
}
|
|
r3 = r1;
|
|
r4 = r2;
|
|
} else {
|
|
r3 = value2;
|
|
r4 = value;
|
|
}
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'GUILD_SETTINGS_SET_SECTION', section: r4, subsection: r3});
|
|
}
|
|
}
|
|
|
|
function setSearchQuery(a0) { // fn#71279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1242, offset: 0x01d1bde0, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SET_SEARCH_QUERY',
|
|
searchQuery: a0});
|
|
}
|
|
|
|
function selectRole(a0, a1) { // fn#71280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1345, offset: 0x01d1be19, size: 63 bytes, params: 3, frame: 12
|
|
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_ROLE_SELECT',
|
|
roleId: a0, searchQuery: a1});
|
|
}
|
|
|
|
function updateEmbed(a0, a1, a2) { // fn#71281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1441, offset: 0x01d1be58, size: 121 bytes, params: 4, frame: 15
|
|
const env0_0 = a0;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD_WIDGET(a0);
|
|
object.body = {enabled: a1, channel_id: a2};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = true;
|
|
return Reflect.apply(patch, HTTP, [object]).then(_fun71282);
|
|
function _fun71282(a0) { // fn#71282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1567, offset: 0x01d1bed1, size: 89 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SET_WIDGET',
|
|
guildId: env0_0, enabled: a0.body.enabled, channelId: a0.body.channel_id});
|
|
}
|
|
|
|
}
|
|
|
|
function updateMFALevel({guildId, level}) { // fn#71283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1703, offset: 0x01d1bf2a, size: 121 bytes, params: 2, frame: 15
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const post = HTTP.post;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD_MFA(guildId);
|
|
object.body = {level: level};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(post, HTTP, [object]).then(_fun71284);
|
|
function _fun71284({body}) { // fn#71284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1824, offset: 0x01d1bfa3, size: 68 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_SET_MFA_SUCCESS',
|
|
level: body.level});
|
|
}
|
|
|
|
}
|
|
|
|
function updateIcon(a0, a1) { // fn#71285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:1906, offset: 0x01d1bfe7, size: 128 bytes, params: 3, frame: 18
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD(a0);
|
|
object.body = {icon: a1};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
Reflect.apply(patch, HTTP, [object]).then(_fun71286, _fun71287);
|
|
function _fun71286() { // fn#71286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2016, offset: 0x01d1c067, size: 87 bytes, params: 1, frame: 16
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_UPDATE', icon: require});
|
|
(GuildTemplateTooltipActionCreators).checkGuildTemplateDirty(env0_0);
|
|
}
|
|
|
|
function _fun71287({body}) { // fn#71287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2116, offset: 0x01d1c0be, size: 62 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
return (Dispatcher).dispatch({type: 'GUILD_SETTINGS_SUBMIT_FAILURE',
|
|
errors: body});
|
|
}
|
|
|
|
}
|
|
|
|
function cancelChanges(a0) { // fn#71288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2193, offset: 0x01d1c0fc, size: 56 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_CANCEL_CHANGES',
|
|
guildId: a0});
|
|
}
|
|
|
|
function updateGuild(a0) { // fn#71289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2278, offset: 0x01d1c134, size: 190 bytes, params: 2, frame: 17
|
|
var object;
|
|
const safetyAlertsChannelId = a0.safetyAlertsChannelId;
|
|
const profile = a0.profile;
|
|
const value = Object.create(null);
|
|
value.safetyAlertsChannelId = 0;
|
|
value.profile = 0;
|
|
const value2 = copyDataProperties({}, a0, value, undefined);
|
|
const object2 = {};
|
|
copyDataProperties(object2, value2, value);
|
|
if (profile != null) {
|
|
object = {};
|
|
copyDataProperties(object, object2.profile ?? ({}), value);
|
|
copyDataProperties(object, profile, value);
|
|
object2.profile = object;
|
|
}
|
|
const guildSettingsStoreBinding = GuildSettingsStore;
|
|
const getGuildId = guildSettingsStoreBinding.getGuildId;
|
|
if (Reflect.apply(getGuildId, guildSettingsStoreBinding, []) != null && safetyAlertsChannelId != null) {
|
|
object2.safetyAlertsChannelId = safetyAlertsChannelId;
|
|
}
|
|
const defaultImport = Dispatcher;
|
|
const dispatch = defaultImport.dispatch;
|
|
const object4 = {type: 'GUILD_SETTINGS_UPDATE'};
|
|
copyDataProperties(object4, object2, value);
|
|
Reflect.apply(dispatch, defaultImport, [object4]);
|
|
}
|
|
|
|
function updateGuildProfile(a0, a1) { // fn#71290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2517, offset: 0x01d1c1f2, size: 66 bytes, params: 3, frame: 14
|
|
const dispatch = Dispatcher.dispatch;
|
|
const object = {type: 'GUILD_SETTINGS_PROFILE_UPDATE', guildId: a0};
|
|
copyDataProperties(object, a1, a0);
|
|
Reflect.apply(dispatch, Dispatcher, [object]);
|
|
}
|
|
|
|
function saveGuild(a0, {name, description, icon, splash, banner, homeHeader, afkChannelId, afkTimeout, systemChannelId, verificationLevel, defaultMessageNotifications, explicitContentFilter, features, systemChannelFlags, preferredLocale, rulesChannelId, safetyAlertsChannelId, ownerConfiguredContentLevel, discoverySplash, publicUpdatesChannelId, premiumProgressBarEnabled, profile, moderatorReportingEnabled, officialMessageColor, verificationRoleId}) { // fn#71291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:2614, offset: 0x01d1c234, size: 719 bytes, params: 3, frame: 39
|
|
let value = a2;
|
|
const env0_0 = a0;
|
|
const r7 = value !== undefined ? value : {};
|
|
const object = {name: name, description: description, icon: icon, splash: splash, banner: banner,
|
|
home_header: homeHeader, features: features, preferred_locale: preferredLocale, afk_channel_id: afkChannelId,
|
|
afk_timeout: afkTimeout, system_channel_id: systemChannelId, verification_level: verificationLevel,
|
|
default_message_notifications: defaultMessageNotifications, explicit_content_filter: explicitContentFilter,
|
|
system_channel_flags: systemChannelFlags, rules_channel_id: rulesChannelId,
|
|
owner_configured_content_level: ownerConfiguredContentLevel, discovery_splash: discoverySplash,
|
|
public_updates_channel_id: publicUpdatesChannelId, safety_alerts_channel_id: safetyAlertsChannelId};
|
|
value = null;
|
|
let r8 = value != premiumProgressBarEnabled ? {premium_progress_bar_enabled: premiumProgressBarEnabled} : value;
|
|
copyDataProperties(object, r8, name);
|
|
if (value == profile) {
|
|
r8 = profile;
|
|
} else {
|
|
value = require(9118) /* metro dependency 9118: GuildTagTypes */;
|
|
value = value.toServerGuildProfile(profile);
|
|
r8 = value;
|
|
}
|
|
object['profile'] = r8;
|
|
object['moderator_reporting_enabled'] = moderatorReportingEnabled;
|
|
object['official_message_color'] = officialMessageColor;
|
|
object['verification_role_id'] = verificationRoleId;
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SUBMIT'});
|
|
const pendingOriginalMd5s = GuildSettingsStore.getPendingOriginalMd5s();
|
|
const defaultImport2 = InlineUploader;
|
|
const buildHeadersForMd5 = defaultImport2.buildHeadersForMd5;
|
|
const {GUILD_ICON, GUILD_BANNER, GUILD_INVITE_SPLASH,
|
|
GUILD_DISCOVERY_SPLASH} = (SafetyScannedUploadSurfacesModule).SafetyScannedUploadSurface;
|
|
const headersForMd5 = Reflect.apply(buildHeadersForMd5, defaultImport2, [{[GUILD_ICON]: pendingOriginalMd5s.icon,
|
|
[GUILD_BANNER]: pendingOriginalMd5s.banner, [GUILD_INVITE_SPLASH]: pendingOriginalMd5s.splash,
|
|
[GUILD_DISCOVERY_SPLASH]: pendingOriginalMd5s.discoverySplash}]);
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object4 = {};
|
|
object4.url = Endpoints.GUILD(a0);
|
|
object4.query = {for_discovery: r7.isForDiscovery};
|
|
object4.body = object;
|
|
object4.headers = headersForMd5;
|
|
object4.oldFormErrors = true;
|
|
object4.rejectWithError = false;
|
|
return Reflect.apply(patch, HTTP, [object4]).then(_fun71292, _fun71293);
|
|
function _fun71292({body}) { // fn#71292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4162, offset: 0x01d1c503, size: 89 bytes, params: 2, frame: 15
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SUBMIT_SUCCESS',
|
|
guild: body});
|
|
(GuildTemplateTooltipActionCreators).checkGuildTemplateDirty(env0_0);
|
|
}
|
|
|
|
function _fun71293(a0) { // fn#71293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4275, offset: 0x01d1c55c, size: 118 bytes, params: 2, frame: 16
|
|
(Dispatcher).dispatch({type: 'GUILD_SETTINGS_SUBMIT_FAILURE',
|
|
errors: a0.body});
|
|
env1_15.error('Failed to save guild settings', {errors: a0.body});
|
|
if (env0_1.throwErr) {
|
|
throw a0.body;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function updateGuildModeration(a0, {verificationLevel, explicitContentFilter}) { // fn#71294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4460, offset: 0x01d1c5d2, size: 134 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD(a0);
|
|
object.body = {verification_level: verificationLevel, explicit_content_filter: explicitContentFilter};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(patch, HTTP, [object]).then(_fun71295);
|
|
function _fun71295(a0) { // fn#71295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4641, offset: 0x01d1c658, size: 48 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
(GuildTemplateTooltipActionCreators).checkGuildTemplateDirty(env0_0);
|
|
return a0;
|
|
}
|
|
|
|
}
|
|
|
|
function transferOwnership(a0, a1) { // fn#71296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4704, offset: 0x01d1c688, size: 169 bytes, params: 3, frame: 19
|
|
const value = a2;
|
|
const value2 = a3;
|
|
const r5 = value !== undefined ? value : null;
|
|
const r7 = value2 !== undefined ? value2 : null;
|
|
const defaultImport = TrackedHTTPUtils;
|
|
const patch = defaultImport.patch;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD(a0);
|
|
object.body = {owner_id: a1, code: r7};
|
|
object.oldFormErrors = true;
|
|
const NetworkActionNames = (AnalyticsUtilsModule).NetworkActionNames;
|
|
const GUILD_TRANSFER_OWNERSHIP = NetworkActionNames.GUILD_TRANSFER_OWNERSHIP;
|
|
object.trackedActionData = {event: GUILD_TRANSFER_OWNERSHIP, properties: {guild_id: a0, verification_type: r5}};
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(patch, defaultImport, [object]);
|
|
}
|
|
|
|
function sendTransferOwnershipPincode(a0) { // fn#71297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:4971, offset: 0x01d1c731, size: 140 bytes, params: 2, frame: 18
|
|
const value = a1;
|
|
const r5 = value !== undefined ? value : false;
|
|
const defaultImport = TrackedHTTPUtils;
|
|
const put = defaultImport.put;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD_PINCODE(a0);
|
|
object.oldFormErrors = true;
|
|
const NetworkActionNames = (AnalyticsUtilsModule).NetworkActionNames;
|
|
const GUILD_TRANSFER_OWNERSHIP_SEND_CODE = NetworkActionNames.GUILD_TRANSFER_OWNERSHIP_SEND_CODE;
|
|
object.trackedActionData = {event: GUILD_TRANSFER_OWNERSHIP_SEND_CODE, properties: {guild_id: a0, is_resend: r5}};
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(put, defaultImport, [object]);
|
|
}
|
|
|
|
function deleteGuild_71298(a0) { // fn#71298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5193, offset: 0x01d1c7bd, size: 96 bytes, params: 2, frame: 14
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const post = HTTP.post;
|
|
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
|
|
object.url = Endpoints.GUILD_DELETE(a0);
|
|
return Reflect.apply(post, HTTP, [object]).then(_fun71299);
|
|
function _fun71299() { // fn#71299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5282, offset: 0x01d1c81d, size: 21 bytes, params: 1, frame: 9
|
|
env1_16.close();
|
|
}
|
|
|
|
}
|
|
|
|
function leaveGuild(a0) { // fn#71300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5311, offset: 0x01d1c832, size: 49 bytes, params: 2, frame: 12
|
|
const value = a1;
|
|
const env0_0 = a0;
|
|
const env0_1 = value !== undefined ? value : false;
|
|
return Module00005(_fun71302)();
|
|
function* _fun71302() { // fn#71302, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5324, offset: 0x01d1c86e, size: 249 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var value7;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var isLurking2 = env2_5.isLurking(require);
|
|
var HTTP = env2_0(env2_2[10]).HTTP;
|
|
var del = HTTP.del;
|
|
var object = {};
|
|
object.url = env2_10.GUILD_LEAVE(require);
|
|
object.body = {lurking: isLurking2 || env2_7.isCurrentUserGuest(require)};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
var value4 = Reflect.apply(del, HTTP, [object]);
|
|
yield value4.then(_fun71303);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
env2_16.close();
|
|
if (importDefault && isLurking2) {
|
|
value7 = env2_0(env2_2[19]);
|
|
value7.transitionTo(env2_14.GUILD_DISCOVERY);
|
|
}
|
|
}
|
|
function _fun71303() { // fn#71303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5489, offset: 0x01d1c967, size: 93 bytes, params: 1, frame: 16
|
|
const binding = env3_0;
|
|
const binding2 = env3_2;
|
|
const AccessibilityAnnouncer = binding(binding2[17]).AccessibilityAnnouncer;
|
|
const announce = AccessibilityAnnouncer.announce;
|
|
const intl = binding(binding2[18]).intl;
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[18]).t['7iPyVW'])]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function updateMemberRoles(a0, a1, a2, a3, a4) { // fn#71304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5662, offset: 0x01d1c9c4, size: 64 bytes, params: 6, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const env0_4 = a4;
|
|
return env0_3(_fun71306)();
|
|
function* _fun71306() { // fn#71306, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5678, offset: 0x01d1ca0f, size: 268 bytes, params: 1, frame: 20
|
|
var environment;
|
|
var HTTP;
|
|
var patch;
|
|
var object;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_4;
|
|
if (binding.isFullServerPreview(require)) {
|
|
binding = env2_6;
|
|
if (importDefault === binding.getId()) {
|
|
env2_0(env2_2[20]).updateImpersonatedRoles(require, dependencyMap);
|
|
return undefined;
|
|
}
|
|
binding = env2_0;
|
|
HTTP = binding(env2_2[10]).HTTP;
|
|
patch = HTTP.patch;
|
|
object = {};
|
|
binding = env2_10;
|
|
object.url = binding.GUILD_MEMBER(require, importDefault);
|
|
object.body = {roles: dependencyMap};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(patch, HTTP, [object]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env1_3;
|
|
binding.forEach(_fun71307);
|
|
ImpersonateStore.forEach(_fun71308);
|
|
} else {
|
|
binding = env2_0;
|
|
HTTP = binding(env2_2[10]).HTTP;
|
|
patch = HTTP.patch;
|
|
object = {};
|
|
binding = env2_10;
|
|
object.url = binding.GUILD_MEMBER(require, importDefault);
|
|
object.body = {roles: dependencyMap};
|
|
object.oldFormErrors = true;
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(patch, HTTP, [object]);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env1_3;
|
|
binding.forEach(_fun71307);
|
|
ImpersonateStore.forEach(_fun71308);
|
|
}
|
|
}
|
|
function _fun71307(a0) { // fn#71307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5884, offset: 0x01d1cb1b, size: 74 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_1(env3_2[9]).dispatch({type: 'GUILD_ROLE_MEMBER_ADD', guildId: require, roleId: a0,
|
|
userId: importDefault});
|
|
}
|
|
|
|
function _fun71308(a0) { // fn#71308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:5977, offset: 0x01d1cb65, size: 74 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_1(env3_2[9]).dispatch({type: 'GUILD_ROLE_MEMBER_REMOVE', guildId: require, roleId: a0,
|
|
userId: importDefault});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function bulkAddMemberRoles(a0, a1, a2) { // fn#71309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6087, offset: 0x01d1cbaf, size: 120 bytes, params: 4, frame: 17
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const patch = HTTP.patch;
|
|
const object = {};
|
|
object.url = Endpoints.GUILD_ROLE_MEMBERS(a0, a1);
|
|
object.body = {member_ids: a2};
|
|
object.rejectWithError = false;
|
|
return Reflect.apply(patch, HTTP, [object]).then(_fun71310);
|
|
function _fun71310({body}) { // fn#71310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6194, offset: 0x01d1cc27, size: 82 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GUILD_ROLE_MEMBER_BULK_ADD',
|
|
guildId: env0_0, roleId: require, added: body});
|
|
}
|
|
|
|
}
|
|
|
|
function migratePinPermission(a0) { // fn#71315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6851, offset: 0x01d1cdf1, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return Module00005(_fun71317)();
|
|
function* _fun71317() { // fn#71317, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6857, offset: 0x01d1ce20, size: 120 bytes, params: 1, frame: 16
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_0;
|
|
var HTTP = binding(env2_2[10]).HTTP;
|
|
var post = HTTP.post;
|
|
binding = env2_10;
|
|
var GUILD_MIGRATE_PIN_PERMISSION = binding.GUILD_MIGRATE_PIN_PERMISSION;
|
|
value = environment.__proto__;
|
|
value = Reflect.apply(post, HTTP, [{url: Reflect.apply(GUILD_MIGRATE_PIN_PERMISSION, binding, [require]),
|
|
rejectWithError: true}]);
|
|
yield value.then(_fun71318);
|
|
}
|
|
function _fun71318() { // fn#71318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:6960, offset: 0x01d1ce98, size: 58 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_1(env3_2[9]).dispatch({type: 'GUILD_SETTINGS_PIN_PERMISSION_MIGRATED', guildId: require});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function migrateSlowmodePermission(a0) { // fn#71319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:7073, offset: 0x01d1ced2, size: 36 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return Module00005(_fun71321)();
|
|
function* _fun71321() { // fn#71321, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:7079, offset: 0x01d1cf01, size: 120 bytes, params: 1, frame: 16
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_0;
|
|
var HTTP = binding(env2_2[10]).HTTP;
|
|
var post = HTTP.post;
|
|
binding = env2_10;
|
|
var GUILD_MIGRATE_SLOWMODE_PERMISSION = binding.GUILD_MIGRATE_SLOWMODE_PERMISSION;
|
|
value = environment.__proto__;
|
|
value = Reflect.apply(post, HTTP, [{url: Reflect.apply(GUILD_MIGRATE_SLOWMODE_PERMISSION, binding, [require]),
|
|
rejectWithError: true}]);
|
|
yield value.then(_fun71322);
|
|
}
|
|
function _fun71322() { // fn#71322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:7187, offset: 0x01d1cf79, size: 58 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return env3_1(env3_2[9]).dispatch({type: 'GUILD_SETTINGS_SLOWMODE_PERMISSION_MIGRATED', guildId: require});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function migratePermissions(a0, {migratePin, migrateSlowmode}) { // fn#71323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:7298, offset: 0x01d1cfb3, size: 63 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
return Module00005(_fun71325)();
|
|
function* _fun71325() { // fn#71325, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9297:7339, offset: 0x01d1cffd, size: 102 bytes, params: 1, frame: 13
|
|
var value3;
|
|
var binding;
|
|
var value6;
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
if (importDefault) {
|
|
value3 = environment.__proto__.__proto__;
|
|
binding = env2_16;
|
|
yield binding.migratePinPermission(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
if (dependencyMap) {
|
|
value6 = environment.__proto__.__proto__;
|
|
binding = env2_16;
|
|
yield binding.migrateSlowmodePermission(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
return undefined;
|
|
}
|
|
} else if (dependencyMap) {
|
|
value6 = environment.__proto__.__proto__;
|
|
binding = env2_16;
|
|
yield binding.migrateSlowmodePermission(require);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun71271, 9112, [5, 1937, 3785, 1226, 1945, 1867, 9113, 661, 3, 694, 507, 6931, 9118, 7618, 7615, 5046,
|
|
480, 3967, 1244, 1230, 6607,
|
|
2]) /* metro module 9112, dependencies: [5, 1937, 3785, 1226, 1945, 1867, 9113, 661, 3, 694, 507, 6931, 9118, 7618, 7615, 5046, 480, 3967, 1244, 1230, 6607, 2] */;
|