487 lines
30 KiB
TypeScript
487 lines
30 KiB
TypeScript
/* Metro module 15192; source: utils/PermissionSpecUtils.tsx; dependencies: [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859, 15196, 9112, 7155, 2] */
|
|
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import HelpdeskUtils from './HelpdeskUtils.tsx'; /* Metro dependency 1948 */
|
|
import GuildSettingsActionCreators from '../modules/guild_settings/GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
|
|
import * as StageMediaHooksModule from '../modules/stage_channels/StageMediaHooks.tsx'; /* Metro dependency 4809 */
|
|
import * as SoundmojiRenderingExperimentModule from '../modules/premium/sounds/soundmoji/SoundmojiRenderingExperiment.tsx'; /* Metro dependency 6636 */
|
|
import * as ThreadHooksModule from '../modules/threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
|
|
import * as ChannelPermissionsConstantsModule from '../modules/channel_permissions/ChannelPermissionsConstants.tsx'; /* Metro dependency 8120 */
|
|
import * as UseGuildEligibleForStageChannelsModule from '../modules/stage_channels/useGuildEligibleForStageChannels.tsx'; /* Metro dependency 15193 */
|
|
import * as HangoutWindowExperimentModule from '../modules/hangout_window/HangoutWindowExperiment.tsx'; /* Metro dependency 15194 */
|
|
import * as PermissionUtilsModule from '../modules/guild_automod/PermissionUtils.tsx'; /* Metro dependency 15195 */
|
|
import * as PermissionUtilsModule2 from '../modules/permissions/PermissionUtils.tsx'; /* Metro dependency 15196 */
|
|
|
|
function _fun116173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:6, offset: 0x0247de90, size: 295 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const conditionalPermissionSpec = function(a0, a1) {
|
|
return a0 ? [a1()] : [];
|
|
};
|
|
const filterPermissions = function(a0, a1) {
|
|
var r0;
|
|
var value = a0;
|
|
var env0_0 = a1;
|
|
if (a1.size === 0) {
|
|
r0 = value;
|
|
} else {
|
|
value = value.map(_fun116177);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {generateChannelPermissionSpec: generateChannelPermissionSpec,
|
|
generateGuildPermissionSpec: generateGuildPermissionSpec, getGuildPermissionSpecMap: function(a0) {
|
|
return importAll(dependencyMap[14]).getGuildPermissionSpec(getPermissionOptions(a0.id));
|
|
}};
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/PermissionSpecUtils.tsx');
|
|
exports.default = object;
|
|
function getPermissionOptions(a0) { // fn#116174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:296, offset: 0x0247dfb7, size: 414 bytes, params: 2, frame: 26
|
|
const isGuildEligibleForStageChannels2 = (UseGuildEligibleForStageChannelsModule).isGuildEligibleForStageChannels(a0);
|
|
const guild = GuildStore.getGuild(a0);
|
|
const r3 = guild != null && (require(6841) /* metro dependency 6841: useIsCreatorMonetizationEnabledGuild */).isCreatorMonetizationEnabledGuild(guild);
|
|
const soundmojiRenderingExperiment = (SoundmojiRenderingExperimentModule).getSoundmojiRenderingExperiment({location: 'getPermissionOptions'});
|
|
const getHangoutWindowExperiment = HangoutWindowExperimentModule.getHangoutWindowExperiment;
|
|
const enableHangoutWindow = Reflect.apply(getHangoutWindowExperiment, HangoutWindowExperimentModule, [{guildId: a0,
|
|
location: 'getPermissionOptions'}]).enableHangoutWindow;
|
|
object = {};
|
|
const intl = (IndexNativeModule).intl;
|
|
let format = intl.format;
|
|
const t = (IndexNativeModule).t;
|
|
const ZuzwPz = t.ZuzwPz;
|
|
const intl2 = (IndexNativeModule).intl;
|
|
const string = intl2.string;
|
|
const DkSwJ2 = t.DkSwJ2;
|
|
object.PRIORITY_SPEAKER_DESCRIPTION = Reflect.apply(format, intl, [ZuzwPz, {keybind: Reflect.apply(string, intl2,
|
|
[DkSwJ2])}]);
|
|
format = intl.format;
|
|
const fVE8y8 = t.fVE8y8;
|
|
const defaultImport = HelpdeskUtils;
|
|
const getArticleURL = defaultImport.getArticleURL;
|
|
const SOUNDBOARD = HelpdeskArticles.SOUNDBOARD;
|
|
object.SOUNDBOARD_DESCRIPTION = Reflect.apply(format, intl, [fVE8y8,
|
|
{helpCenterArticle: Reflect.apply(getArticleURL, defaultImport, [SOUNDBOARD])}]);
|
|
object.showStageChannelPermissions = isGuildEligibleForStageChannels2;
|
|
object.showExperimental = true;
|
|
object.showMembershipManualApprovalPermissions = true;
|
|
object.showCreatorMonetizationAnalyticsPermission = r3;
|
|
object.inSoundmojiExperiment = soundmojiRenderingExperiment;
|
|
object.enableHangoutWindow = enableHangoutWindow;
|
|
return object;
|
|
}
|
|
|
|
function filterPermissions(a0, a1) { // fn#116176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1111, offset: 0x0247e177, size: 45 bytes, params: 3, frame: 13
|
|
var r0;
|
|
let value = a0;
|
|
const env0_0 = a1;
|
|
if (a1.size === 0) {
|
|
r0 = value;
|
|
} else {
|
|
value = value.map(function(a0) {
|
|
var r3;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r3);
|
|
object['permissions'] = a0.permissions.filter(_fun116178);
|
|
return object;
|
|
});
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _fun116177(a0) { // fn#116177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1170, offset: 0x0247e1a4, size: 51 bytes, params: 2, frame: 13
|
|
const object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
object['permissions'] = a0.permissions.filter(function(a0) {
|
|
return !require.has(a0.flag.toString());
|
|
});
|
|
return object;
|
|
function _fun116178({flag}) { // fn#116178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1214, offset: 0x0247e1d7, size: 40 bytes, params: 2, frame: 12
|
|
return !require.has(flag.toString());
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function generateChannelPermissionSpec(a0, a1, a2, a3) { // fn#116179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1286, offset: 0x0247e1ff, size: 3036 bytes, params: 5, frame: 34
|
|
var r23;
|
|
var r13;
|
|
var r22;
|
|
var r14;
|
|
var defaultImport;
|
|
var add;
|
|
var MANAGE_OFFICIAL_MESSAGES;
|
|
var moduleValue3;
|
|
var generateChannelGeneralSection;
|
|
const intl = (IndexNativeModule).intl;
|
|
var string;
|
|
const t = (IndexNativeModule).t;
|
|
var moduleValue4;
|
|
var generateChannelMembershipSection;
|
|
var moduleValue5;
|
|
var generateChannelTextSection;
|
|
var moduleValue6;
|
|
var generateChannelAppsSection;
|
|
var moduleValue7;
|
|
var moduleValue8;
|
|
var moduleValue9;
|
|
var format;
|
|
var setUpAutomod2;
|
|
var moduleValue10;
|
|
var moduleValue11;
|
|
var value18;
|
|
var moduleValue12;
|
|
var moduleValue13;
|
|
var generateChannelStageVoiceSection;
|
|
var moduleValue14;
|
|
var generateChannelStageSection;
|
|
var moduleValue15;
|
|
var generateChannelEventsSection;
|
|
var moduleValue16;
|
|
var moduleValue17;
|
|
var moduleValue18;
|
|
var value23;
|
|
var moduleValue19;
|
|
var moduleValue20;
|
|
var generateChannelVoiceSection;
|
|
var moduleValue21;
|
|
var moduleValue22;
|
|
var moduleValue23;
|
|
var moduleValue24;
|
|
var moduleValue25;
|
|
var moduleValue26;
|
|
var moduleValue27;
|
|
var moduleValue28;
|
|
var value30;
|
|
var moduleValue29;
|
|
const env0_0 = a0;
|
|
const getPermissionOptionsBinding = getPermissionOptions;
|
|
const value2 = undefined;
|
|
const permissionOptionsBinding = getPermissionOptionsBinding(a0);
|
|
const getChannelPermissionSpecMapBinding = getChannelPermissionSpecMap;
|
|
let object = {};
|
|
copyDataProperties(object, a3, undefined);
|
|
object['enableHangoutWindow'] = permissionOptionsBinding.enableHangoutWindow;
|
|
const channelPermissionSpecMapBinding = getChannelPermissionSpecMapBinding(a1, a2, object);
|
|
const VoiceInThreadsExperiment = (ThreadHooksModule).VoiceInThreadsExperiment;
|
|
const getCurrentConfig = VoiceInThreadsExperiment.getCurrentConfig;
|
|
const r8 = Reflect.apply(getCurrentConfig, VoiceInThreadsExperiment, [{guildId: a0,
|
|
location: '3ad37d_1'}]).enabled && VOICE_THREAD_PARENT_CHANNEL_TYPES.has(a1.type);
|
|
const isStageVideoEnabled2 = (StageMediaHooksModule).isStageVideoEnabled(a0);
|
|
const canCurrentUserManageMessageFilters2 = (PermissionUtilsModule).canCurrentUserManageMessageFilters(a0);
|
|
const isMediaChannel2 = a1.isMediaChannel();
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
const guild = GuildStore.getGuild(a0);
|
|
let r1 = guild == null ? value2 : guild.features.has(GuildFeatures.VERIFIED);
|
|
if (r1) {
|
|
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
|
|
r1 = defaultImport.getCurrentConfig({guildId: a0, location: 'generateChannelPermissionSpec'}).enabled;
|
|
}
|
|
if (!r1) {
|
|
add = set.add;
|
|
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
|
|
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
|
|
}
|
|
const inSoundmojiExperiment = permissionOptionsBinding.inSoundmojiExperiment;
|
|
const type = a1.type;
|
|
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
|
|
if (GUILD_CATEGORY === type) {
|
|
moduleValue24 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue24.generateChannelGeneralSection;
|
|
string = intl.string;
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue24, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['AkPxc+']])])];
|
|
moduleValue25 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue25.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue25, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue26 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
object[2] = moduleValue26.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
|
|
{'showPrivateThreads': true, 'showCreateThreads': true, inSoundmojiExperiment: inSoundmojiExperiment});
|
|
moduleValue27 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelVoiceSection = moduleValue27.generateChannelVoiceSection;
|
|
string = intl.string;
|
|
object[3] = Reflect.apply(generateChannelVoiceSection, moduleValue27, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['46Ra1b']])]);
|
|
moduleValue28 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelAppsSection = moduleValue28.generateChannelAppsSection;
|
|
string = intl.string;
|
|
object[4] = Reflect.apply(generateChannelAppsSection, moduleValue28, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['rrh/W6']])]);
|
|
value30 = arraySpread(object, conditionalPermissionSpec(permissionOptionsBinding.showStageChannelPermissions,
|
|
_fun116180), 5, r23);
|
|
moduleValue29 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelEventsSection = moduleValue29.generateChannelEventsSection;
|
|
string = intl.string;
|
|
object[value30] = Reflect.apply(generateChannelEventsSection, moduleValue29, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.b8lplT])]);
|
|
value30 + 1;
|
|
r1 = object;
|
|
} else if (ChannelTypes.GUILD_VOICE === type) {
|
|
moduleValue18 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue18.generateChannelGeneralSection;
|
|
value23 = intl.string(t.ouHggI);
|
|
object = {showManageWebhooks: true};
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue18, [channelPermissionSpecMapBinding, value23,
|
|
object])];
|
|
moduleValue19 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue19.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue19, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue20 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelVoiceSection = moduleValue20.generateChannelVoiceSection;
|
|
string = intl.string;
|
|
object[2] = Reflect.apply(generateChannelVoiceSection, moduleValue20, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['46Ra1b']])]);
|
|
moduleValue21 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
object[3] = moduleValue21.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
|
|
intl.string(t.iqlsnD),
|
|
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
|
|
{setUpAutomod: setUpAutomod_116181}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
|
|
moduleValue22 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelEventsSection = moduleValue22.generateChannelEventsSection;
|
|
string = intl.string;
|
|
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue22, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.b8lplT])]);
|
|
moduleValue23 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelAppsSection = moduleValue23.generateChannelAppsSection;
|
|
string = intl.string;
|
|
object[5] = Reflect.apply(generateChannelAppsSection, moduleValue23, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['rrh/W6']])]);
|
|
r1 = object;
|
|
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
|
|
moduleValue11 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue11.generateChannelGeneralSection;
|
|
value18 = intl.string(t.ouHggI);
|
|
object = {showManageWebhooks: false};
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue11, [channelPermissionSpecMapBinding, value18,
|
|
object])];
|
|
moduleValue12 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue12.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue12, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue13 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelStageVoiceSection = moduleValue13.generateChannelStageVoiceSection;
|
|
string = intl.string;
|
|
object[2] = Reflect.apply(generateChannelStageVoiceSection, moduleValue13, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['46Ra1b']]), isStageVideoEnabled2]);
|
|
moduleValue14 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelStageSection = moduleValue14.generateChannelStageSection;
|
|
string = intl.string;
|
|
object[3] = Reflect.apply(generateChannelStageSection, moduleValue14, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.yniauk])]);
|
|
moduleValue15 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelEventsSection = moduleValue15.generateChannelEventsSection;
|
|
string = intl.string;
|
|
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue15, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.b8lplT])]);
|
|
moduleValue16 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
object[5] = moduleValue16.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
|
|
intl.string(t.iqlsnD),
|
|
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
|
|
{setUpAutomod: setUpAutomod_116182}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
|
|
moduleValue17 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
object[6] = moduleValue17.generateChannelAppsSection(channelPermissionSpecMapBinding, intl.string(t['rrh/W6']),
|
|
{showActivities: false});
|
|
r1 = object;
|
|
} else if (ChannelTypes.GUILD_FORUM === type) {
|
|
string = intl.string;
|
|
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
|
|
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
|
|
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
|
|
string = intl.string;
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.ouHggI])])];
|
|
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelTextSection = moduleValue9.generateChannelTextSection;
|
|
if (canCurrentUserManageMessageFilters2) {
|
|
format = intl.format;
|
|
setUpAutomod2 = setUpAutomod;
|
|
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: setUpAutomod2}]);
|
|
r23 = setUpAutomod2;
|
|
} else {
|
|
r14 = value2;
|
|
r23 = require;
|
|
}
|
|
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
|
|
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
|
|
inSoundmojiExperiment: inSoundmojiExperiment}]);
|
|
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
|
|
string = intl.string;
|
|
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['rrh/W6']])]);
|
|
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
|
|
r1 = object;
|
|
} else if (ChannelTypes.GUILD_MEDIA === type) {
|
|
string = intl.string;
|
|
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
|
|
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
|
|
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
|
|
string = intl.string;
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.ouHggI])])];
|
|
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelTextSection = moduleValue9.generateChannelTextSection;
|
|
if (canCurrentUserManageMessageFilters2) {
|
|
format = intl.format;
|
|
setUpAutomod2 = setUpAutomod;
|
|
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: setUpAutomod2}]);
|
|
r23 = setUpAutomod2;
|
|
} else {
|
|
r14 = value2;
|
|
r23 = require;
|
|
}
|
|
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
|
|
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
|
|
inSoundmojiExperiment: inSoundmojiExperiment}]);
|
|
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
|
|
string = intl.string;
|
|
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['rrh/W6']])]);
|
|
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
|
|
r1 = object;
|
|
} else {
|
|
moduleValue3 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelGeneralSection = moduleValue3.generateChannelGeneralSection;
|
|
string = intl.string;
|
|
object = [Reflect.apply(generateChannelGeneralSection, moduleValue3, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.ouHggI])])];
|
|
moduleValue4 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelMembershipSection = moduleValue4.generateChannelMembershipSection;
|
|
string = intl.string;
|
|
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue4, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t.Ny49TN])]);
|
|
moduleValue5 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
object[2] = moduleValue5.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
|
|
{showPrivateThreads: a1.type !== ChannelTypes.GUILD_ANNOUNCEMENT, showCreateThreads: true,
|
|
inSoundmojiExperiment: inSoundmojiExperiment});
|
|
moduleValue6 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
|
|
generateChannelAppsSection = moduleValue6.generateChannelAppsSection;
|
|
string = intl.string;
|
|
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue6, [channelPermissionSpecMapBinding,
|
|
Reflect.apply(string, intl, [t['rrh/W6']])]);
|
|
arraySpread(object, conditionalPermissionSpec(r8, _fun116185), 4, r23);
|
|
r1 = object;
|
|
}
|
|
return filterPermissions(r1, set);
|
|
function _fun116180() { // fn#116180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:2445, offset: 0x0247eddb, size: 97 bytes, params: 1, frame: 18
|
|
const permissionUtilsModule = PermissionUtilsModule2;
|
|
const generateChannelStageSection = permissionUtilsModule.generateChannelStageSection;
|
|
const binding = env0_1;
|
|
const intl = (IndexNativeModule).intl;
|
|
return Reflect.apply(generateChannelStageSection, permissionUtilsModule, [binding,
|
|
intl.string((IndexNativeModule).t.yniauk)]);
|
|
}
|
|
|
|
function generateChannelPermissionSpecSetUpAutomod() { // fn#116181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:3062, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee3c, size: 56 bytes, params: 1, frame: 14
|
|
const defaultImport = GuildSettingsActionCreators;
|
|
const open = defaultImport.open;
|
|
const binding = env0_0;
|
|
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
|
|
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
|
|
}
|
|
|
|
function generateChannelPermissionSpecSetUpAutomod_116182() { // fn#116182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:3919, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee3c, size: 56 bytes, params: 1, frame: 14
|
|
const defaultImport = GuildSettingsActionCreators;
|
|
const open = defaultImport.open;
|
|
const binding = env0_0;
|
|
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
|
|
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
|
|
}
|
|
|
|
function generateChannelPermissionSpecSetUpAutomod_116183() { // fn#116183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4570, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee74, size: 98 bytes, params: 1, frame: 14
|
|
var value2;
|
|
if (!env0_2) {
|
|
value2 = environment.__proto__;
|
|
(require(7155) /* metro dependency 7155: Tracking */).trackForumEnableAutomodClicked();
|
|
}
|
|
const defaultImport = GuildSettingsActionCreators;
|
|
const open = defaultImport.open;
|
|
const binding = env0_0;
|
|
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
|
|
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
|
|
}
|
|
|
|
function _fun116184() { // fn#116184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4801, offset: 0x0247eed6, size: 97 bytes, params: 1, frame: 18
|
|
const permissionUtilsModule = PermissionUtilsModule2;
|
|
const generateChannelVoiceSection = permissionUtilsModule.generateChannelVoiceSection;
|
|
const binding = env0_1;
|
|
const intl = (IndexNativeModule).intl;
|
|
return Reflect.apply(generateChannelVoiceSection, permissionUtilsModule, [binding,
|
|
intl.string((IndexNativeModule).t['46Ra1b'])]);
|
|
}
|
|
|
|
function _fun116185() { // fn#116185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:5354, offset: 0x0247eed6, size: 97 bytes, params: 1, frame: 18
|
|
const permissionUtilsModule = PermissionUtilsModule2;
|
|
const generateChannelVoiceSection = permissionUtilsModule.generateChannelVoiceSection;
|
|
const binding = env0_1;
|
|
const intl = (IndexNativeModule).intl;
|
|
return Reflect.apply(generateChannelVoiceSection, permissionUtilsModule, [binding,
|
|
intl.string((IndexNativeModule).t['46Ra1b'])]);
|
|
}
|
|
|
|
}
|
|
|
|
function generateGuildPermissionSpec(a0) { // fn#116186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:5501, offset: 0x0247ef37, size: 269 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var add;
|
|
var VIEW_GUILD_ANALYTICS;
|
|
var defaultImport;
|
|
var MANAGE_OFFICIAL_MESSAGES;
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
let features = a0.features;
|
|
let has = features.has;
|
|
const COMMUNITY = GuildFeatures.COMMUNITY;
|
|
if (!Reflect.apply(has, features, [COMMUNITY])) {
|
|
add = set.add;
|
|
VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
|
|
Reflect.apply(add, set, [VIEW_GUILD_ANALYTICS.toString()]);
|
|
}
|
|
features = a0.features;
|
|
has = features.has;
|
|
const VERIFIED = GuildFeatures.VERIFIED;
|
|
const value3 = Reflect.apply(has, features, [VERIFIED]);
|
|
if (value3) {
|
|
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
|
|
r1 = defaultImport.getCurrentConfig({guildId: a0.id, location: 'generateGuildPermissionSpec'}).enabled;
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
if (!r1) {
|
|
add = set.add;
|
|
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
|
|
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
|
|
}
|
|
const filterPermissionsBinding = filterPermissions;
|
|
const permissionUtilsModule = PermissionUtilsModule2;
|
|
return filterPermissionsBinding(permissionUtilsModule.generateGuildPermissionSpec(getPermissionOptions(a0.id)), set);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116173, 15192, [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859,
|
|
15196, 9112, 7155,
|
|
2]) /* metro module 15192, dependencies: [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859, 15196, 9112, 7155, 2] */;
|