Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/* Metro module 15886; source: modules/guild_automod/AutomodActionUtils.tsx; dependencies: [11454, 2] */
|
||||
function _fun122585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16094:6, offset: 0x0256cd60, size: 188 bytes, params: 8, frame: 19
|
||||
const closure = getDefaultActions;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(11454) /* metro dependency 11454: Constants */).AutomodActionType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodActionUtils.tsx');
|
||||
exports.getRuleDefaultActionsFromConfig = getRuleDefaultActionsFromConfig;
|
||||
exports.isActionFlagToChannel = function({type}) {
|
||||
return type === AutomodActionType.FLAG_TO_CHANNEL;
|
||||
};
|
||||
exports.isActionUserCommunicationDisabled = function({type}) {
|
||||
return type === AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
};
|
||||
exports.isActionBlockMessage = function({type}) {
|
||||
return type === AutomodActionType.BLOCK_MESSAGE;
|
||||
};
|
||||
exports.isActionQuarantineUser = function({type}) {
|
||||
return type === AutomodActionType.QUARANTINE_USER;
|
||||
};
|
||||
exports.getDefaultActions = closure;
|
||||
}
|
||||
|
||||
function getDefaultActions() { // fn#122586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16094:124, offset: 0x0256ce1c, size: 178 bytes, params: 1, frame: 7
|
||||
const BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
const BLOCK_MESSAGE2 = AutomodActionType.BLOCK_MESSAGE;
|
||||
const FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
const FLAG_TO_CHANNEL2 = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
const USER_COMMUNICATION_DISABLED = AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
const USER_COMMUNICATION_DISABLED2 = AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
const QUARANTINE_USER = AutomodActionType.QUARANTINE_USER;
|
||||
const QUARANTINE_USER2 = AutomodActionType.QUARANTINE_USER;
|
||||
return {[BLOCK_MESSAGE]: {type: BLOCK_MESSAGE2, metadata: {customMessage: undefined}},
|
||||
[FLAG_TO_CHANNEL]: {type: FLAG_TO_CHANNEL2, metadata: {channelId: undefined}},
|
||||
[USER_COMMUNICATION_DISABLED]: {type: USER_COMMUNICATION_DISABLED2, metadata: {durationSeconds: 60}},
|
||||
[QUARANTINE_USER]: {type: QUARANTINE_USER2, metadata: {}}};
|
||||
}
|
||||
|
||||
function getRuleDefaultActionsFromConfig({defaultActionTypes}) { // fn#122587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16094:575, offset: 0x0256cece, size: 65 bytes, params: 2, frame: 12
|
||||
const env0_0 = getDefaultActions();
|
||||
const Array = global.Array;
|
||||
return Array.from(defaultActionTypes).map(_fun122588);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* Metro module 5060; source: modules/guild_automod/AutomodAlert.tsx; dependencies: [2] */
|
||||
function _fun43764(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5238:6, offset: 0x0115daca, size: 173 bytes, params: 8, frame: 16
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {SET_COMPLETED: 1};
|
||||
object2[1] = 'SET_COMPLETED';
|
||||
object2.UNSET_COMPLETED = 2;
|
||||
object2[2] = 'UNSET_COMPLETED';
|
||||
object2.DELETE_USER_MESSAGE = 3;
|
||||
object2[3] = 'DELETE_USER_MESSAGE';
|
||||
object2.SUBMIT_FEEDBACK = 4;
|
||||
object2[4] = 'SUBMIT_FEEDBACK';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodAlert.tsx');
|
||||
exports.AutomodAlertActionType = object2;
|
||||
exports.parseAlertActionsExecution = function(a0) {
|
||||
var r2;
|
||||
var r1;
|
||||
var property;
|
||||
var value2;
|
||||
var error;
|
||||
var value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
if (value == a0) {
|
||||
r2 = value;
|
||||
} else {
|
||||
try {
|
||||
property = global.JSON;
|
||||
value2 = property.parse(a0);
|
||||
r2 = value2;
|
||||
} catch (error) {
|
||||
r2 = value;
|
||||
}
|
||||
}
|
||||
var env0_0 = r2;
|
||||
if (value == r2) {
|
||||
r1 = value;
|
||||
} else if (value == r2.actions) {
|
||||
r1 = value;
|
||||
} else {
|
||||
global.Object.keys(r2.actions).forEach(_fun43766);
|
||||
r1 = r2;
|
||||
}
|
||||
return r1;
|
||||
};
|
||||
}
|
||||
|
||||
function parseAlertActionsExecution(a0) { // fn#43765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5238:424, offset: 0x0115db77, size: 125 bytes, params: 2, frame: 15
|
||||
var r2;
|
||||
var r1;
|
||||
var JSON;
|
||||
var value2;
|
||||
var error;
|
||||
var Object;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
if (value == a0) {
|
||||
r2 = value;
|
||||
} else {
|
||||
try {
|
||||
JSON = global.JSON;
|
||||
value2 = JSON.parse(a0);
|
||||
r2 = value2;
|
||||
} catch (error) {
|
||||
r2 = value;
|
||||
}
|
||||
}
|
||||
if (value == r2) {
|
||||
r1 = value;
|
||||
} else if (value == r2.actions) {
|
||||
r1 = value;
|
||||
} else {
|
||||
Object = global.Object;
|
||||
Object.keys(r2.actions).forEach(_fun43766);
|
||||
r1 = r2;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun43766(a0) { // fn#43766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5238:662, offset: 0x0115dbf4, size: 30 bytes, params: 2, frame: 2
|
||||
env0_0.actions[a0].actionType = a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
/* Metro module 7246; source: modules/guild_automod/AutomodErrorUtils.tsx; dependencies: [7, 6, 15, 17, 18, 162, 1379, 661, 1244, 4862, 2] */
|
||||
function _fun58240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:6, offset: 0x016c2994, size: 403 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = getAutomodErrorMessageFromErrorResponse;
|
||||
const closure2 = getAutomodErrorMessageFromMessageData;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(162) /* metro dependency 162 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const AbortCodes = (require(661) /* metro dependency 661: Constants */).AbortCodes;
|
||||
let Error = global.Error;
|
||||
const value3 = _fun58247(value(Error));
|
||||
Error = global.Error;
|
||||
value = value(Error);
|
||||
value = _fun58249(value);
|
||||
const Set = global.Set;
|
||||
const AUTOMOD_MESSAGE_BLOCKED = AbortCodes.AUTOMOD_MESSAGE_BLOCKED;
|
||||
const AUTOMOD_TITLE_BLOCKED = AbortCodes.AUTOMOD_TITLE_BLOCKED;
|
||||
const AUTOMOD_INVALID_RUST_SERVICE_RESPONSE = AbortCodes.AUTOMOD_INVALID_RUST_SERVICE_RESPONSE;
|
||||
const set = new Set([AUTOMOD_MESSAGE_BLOCKED, AUTOMOD_TITLE_BLOCKED, AUTOMOD_INVALID_RUST_SERVICE_RESPONSE]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodErrorUtils.tsx');
|
||||
exports.InvalidKeywordError = value3;
|
||||
exports.InvalidRegexPatternError = value;
|
||||
exports.AUTOMOD_ERROR_CODES = set;
|
||||
exports.getAutomodErrorMessageFromErrorResponse = closure;
|
||||
exports.getAutomodErrorMessageFromMessageData = closure2;
|
||||
exports.getAutomodErrorMessage = getAutomodErrorMessage;
|
||||
}
|
||||
|
||||
function _callSuper_58241(a0, a1, a2) { // fn#58241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:189, offset: 0x016c2b27, size: 100 bytes, params: 4, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = a2;
|
||||
const value3 = env0_5(a1);
|
||||
const binding = env0_4;
|
||||
if (_isNativeReflectConstruct_58242()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value3, value || [], env0_5(a0).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value3.apply(a0, value);
|
||||
r0 = value;
|
||||
}
|
||||
return binding(a0, r0);
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_58242() { // fn#58242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:320, offset: 0x016c2b8b, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_58242_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getAutomodErrorMessageFromErrorResponse(a0, a1) { // fn#58245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:1031, offset: 0x016c2be9, size: 342 bytes, params: 3, frame: 17
|
||||
var channel;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (a0 != null) {
|
||||
var code = a0.code;
|
||||
var message = a0.message;
|
||||
var binding = env0_9;
|
||||
if (binding.has(code)) {
|
||||
if (message != null) {
|
||||
return message;
|
||||
}
|
||||
if (a1 == null) {
|
||||
return null;
|
||||
}
|
||||
channel = ChannelStore.getChannel(a1);
|
||||
if (channel == null) {
|
||||
if (channel == null) {
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumLikeChannel()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumPost()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumLikeChannel()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (channel.isThread()) {
|
||||
return intl.string(t.DVdG9E);
|
||||
}
|
||||
if (channel == null) {
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumLikeChannel()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumPost()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
if (channel.isForumLikeChannel()) {
|
||||
if (code === AbortCodes.AUTOMOD_TITLE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
if (code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return intl.string(t.ipgKDg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getAutomodErrorMessageFromMessageData(a0) { // fn#58246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:1521, offset: 0x016c2d3f, size: 355 bytes, params: 2, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const channel = ChannelStore.getChannel(a0.message.channelId);
|
||||
const messageQueueModule = require(4862) /* metro dependency 4862: MessageQueue */;
|
||||
return messageQueueModule.isMessageDataEdit(a0) ? intl.string(t.bU6o0z) : channel == null ? channel == null ? channel == null ? intl.string(t.zQ69pv) : channel.isForumLikeChannel() ? intl.string(t.ipgKDg) : intl.string(t.zQ69pv) : channel.isForumPost() ? intl.string(t.ipgKDg) : channel == null ? intl.string(t.zQ69pv) : channel.isForumLikeChannel() ? intl.string(t.ipgKDg) : intl.string(t.zQ69pv) : channel.isThread() ? intl.string(t.DVdG9E) : channel == null ? channel == null ? intl.string(t.zQ69pv) : channel.isForumLikeChannel() ? intl.string(t.ipgKDg) : intl.string(t.zQ69pv) : channel.isForumPost() ? intl.string(t.ipgKDg) : channel == null ? intl.string(t.zQ69pv) : channel.isForumLikeChannel() ? intl.string(t.ipgKDg) : intl.string(t.zQ69pv);
|
||||
}
|
||||
|
||||
function _fun58247(a0) { // fn#58247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:519, offset: 0x016c2ea2, size: 40 bytes, params: 2, frame: 14
|
||||
const closure = InvalidKeywordError;
|
||||
env0_6(closure, a0);
|
||||
return env0_2(closure);
|
||||
}
|
||||
|
||||
function _fun58249(a0) { // fn#58249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:712, offset: 0x016c2ef4, size: 40 bytes, params: 2, frame: 14
|
||||
const closure = InvalidRegexPatternError;
|
||||
env0_6(closure, a0);
|
||||
return env0_2(closure);
|
||||
}
|
||||
|
||||
function getAutomodErrorMessage(a0, a1) { // fn#58251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:2225, offset: 0x016c2f1c, size: 101 bytes, params: 3, frame: 16
|
||||
var r1;
|
||||
var r0;
|
||||
var intl;
|
||||
const automodErrorMessageFromErrorResponse = getAutomodErrorMessageFromErrorResponse(a1);
|
||||
if (automodErrorMessageFromErrorResponse != null) {
|
||||
r0 = automodErrorMessageFromErrorResponse;
|
||||
} else {
|
||||
if (a0 == null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zQ69pv);
|
||||
} else {
|
||||
r1 = getAutomodErrorMessageFromMessageData(a0);
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function InvalidKeywordError() { // fn#58248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7424:531, offset: 0x016c2eca, size: 42 bytes, params: 1, frame: 16
|
||||
env1_3(this, InvalidKeywordError);
|
||||
return _callSuper_58241(this, InvalidKeywordError, arguments);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 10926; source: modules/guild_automod/AutomodExperiment.tsx; dependencies: [4620, 2] */
|
||||
function _fun83735(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11112:6, offset: 0x01f26493, size: 166 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4620) /* metro dependency 4620: experiments */;
|
||||
value = value.createExperiment({'kind': 'guild', 'id': '2022-12_mention_raid_limit',
|
||||
'label': 'Automod Mention Raid Limit', defaultConfig: {enabled: false}, treatments: [{'id': 1,
|
||||
'label': 'Automod Mention Raid Limit', config: {enabled: true}}]});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodExperiment.tsx');
|
||||
exports.AutomodMentionRaidLimit = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 5061; source: modules/guild_automod/AutomodFeedback.tsx; dependencies: [1244, 2] */
|
||||
function _fun43767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5239:6, offset: 0x0115dc12, size: 311 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodFeedback.tsx');
|
||||
exports.Feedback = {BUG: 'BUG', ALLOWED: 'ALLOWED',
|
||||
MENTION_RAID_REMOVE_RESTRICTION: 'MENTION_RAID_REMOVE_RESTRICTION'};
|
||||
exports.generateFeedbackOptions = generateFeedbackOptions;
|
||||
exports.RaidAlertType = {JOIN_RAID: 'JOIN_RAID', MENTION_RAID: 'MENTION_RAID'};
|
||||
exports.RaidResolutionType = {LEGITIMATE_ACTIVITY: 'LEGITIMATE_ACTIVITY',
|
||||
LEGITIMATE_ACCOUNTS: 'LEGITIMATE_ACCOUNTS', LEGITIMATE_DMS: 'LEGITIMATE_DMS', DM_SPAM: 'DM_SPAM',
|
||||
JOIN_RAID: 'JOIN_RAID', OTHER: 'OTHER'};
|
||||
exports.getMostImportantRaidResolutionType = getMostImportantRaidResolutionType;
|
||||
exports.RaidLockdownFeedbackType = {DM_SPAM: 'DM_SPAM', MENTION_SPAM: 'MENTION_SPAM', CHANNEL_SPAM: 'CHANNEL_SPAM',
|
||||
SUS_NEW_MEMBERS: 'SUS_NEW_MEMBERS', CHANGING_SETTINGS: 'CHANGING_SETTINGS', OTHER: 'OTHER'};
|
||||
}
|
||||
|
||||
function generateFeedbackOptions() { // fn#43768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5239:838, offset: 0x0115dd49, size: 157 bytes, params: 1, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const binding = env0_2;
|
||||
const BUG = binding.BUG;
|
||||
const items2 = [{name: Reflect.apply(string, intl, [t['+MbOX4']]), value: BUG}];
|
||||
string = intl.string;
|
||||
const CRsCRC = t.CRsCRC;
|
||||
const ALLOWED = binding.ALLOWED;
|
||||
items2[1] = {name: Reflect.apply(string, intl, [CRsCRC]), value: ALLOWED};
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getMostImportantRaidResolutionType(a0) { // fn#43769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5239:1081, offset: 0x0115dde6, size: 119 bytes, params: 2, frame: 12
|
||||
const includes = a0.includes;
|
||||
const LEGITIMATE_ACTIVITY = env0_3.LEGITIMATE_ACTIVITY;
|
||||
return Reflect.apply(includes, a0,
|
||||
[LEGITIMATE_ACTIVITY]) ? env0_3.LEGITIMATE_ACTIVITY : a0.includes(env0_3.DM_SPAM) ? env0_3.DM_SPAM : a0.includes(env0_3.JOIN_RAID) ? env0_3.JOIN_RAID : env0_3.OTHER;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
/* Metro module 5051; source: modules/guild_automod/AutomodMessageUtils.tsx; dependencies: [57, 31, 1379, 3784, 3793, 1878, 661, 5052, 5053, 5054, 1244, 5055, 5056, 5057, 4805, 5058, 5059, 5060, 566, 5061, 2] */
|
||||
function _fun43731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:6, offset: 0x0115bf02, size: 443 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = extractAutomodMessageFields;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.MessageEmbedTypes;
|
||||
const env0_9 = constantsModule.MessageTypes;
|
||||
const env0_10 = constantsModule.NOOP_NULL;
|
||||
const env0_11 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodMessageUtils.tsx');
|
||||
exports.default = useAutomodMessageFields;
|
||||
exports.isAutomodMessageRecord = function({type}) {
|
||||
return type === MessageTypes.AUTO_MODERATION_ACTION;
|
||||
};
|
||||
exports.isAutomodNotification = function({embeds}) {
|
||||
return embeds?.some(_fun43748);
|
||||
};
|
||||
exports.getActionHeaderTextMobile = getActionHeaderTextMobile;
|
||||
exports.getActionHeaderText = getActionHeaderText;
|
||||
exports.getQuarantineReasonString = getQuarantineReasonString;
|
||||
exports.extractAutomodNotificationFields = extractAutomodNotificationFields;
|
||||
exports.extractAutomodMessageFields = closure;
|
||||
exports.useAutomodAlertActions = function(a0) {
|
||||
var value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
var alertActionsExecution = extractAutomodMessageFields(a0).alertActionsExecution;
|
||||
return value != alertActionsExecution ? alertActionsExecution : value;
|
||||
};
|
||||
exports.getRaidAlertResolveCTAText = getRaidAlertResolveCTAText;
|
||||
exports.getUserIdOfAutomodAction = function(a0) {
|
||||
var getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
var ACTION_BY_USER_ID = require(dependencyMap[16]).AutomodNotificationEmbedKeys.ACTION_BY_USER_ID;
|
||||
return getEmbedFieldFromMessageBinding(a0, ACTION_BY_USER_ID);
|
||||
};
|
||||
exports.IS_BACKWARDS_COMPAT_RAID_TYPE = undefined;
|
||||
}
|
||||
|
||||
function getEmbedFieldFromMessage({embeds}, a1) { // fn#43732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:235, offset: 0x0115c0bd, size: 210 bytes, params: 3, frame: 17
|
||||
const env0_0 = a1;
|
||||
const property = env0_2(embeds ?? [], 1)[0];
|
||||
if (property != null) {
|
||||
var type = property.type;
|
||||
var AUTO_MODERATION_MESSAGE = MessageEmbedTypes.AUTO_MODERATION_MESSAGE;
|
||||
if (type === AUTO_MODERATION_MESSAGE) {
|
||||
return property == null || property.fields == null ? undefined : property.fields.find(function({rawName}) {
|
||||
return rawName === require;
|
||||
})?.rawValue;
|
||||
}
|
||||
type = property.type;
|
||||
var AUTO_MODERATION_NOTIFICATION = MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
if (type === AUTO_MODERATION_NOTIFICATION) {
|
||||
return property == null || property.fields == null ? undefined : property.fields.find(function({rawName}) {
|
||||
return rawName === require;
|
||||
})?.rawValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getMessageContentFromEmbed({embeds}) { // fn#43735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:705, offset: 0x0115c1a5, size: 72 bytes, params: 2, frame: 14
|
||||
const r4 = embeds ?? [];
|
||||
const value = undefined;
|
||||
const property = env0_2(r4, 1)[0];
|
||||
return (property == null ? value : property.rawDescription) ?? '';
|
||||
}
|
||||
|
||||
function getDecisionOutcomeFromMessage(a0) { // fn#43736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:844, offset: 0x0115c1ed, size: 60 bytes, params: 2, frame: 13
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const DECISION_OUTCOME = AutomodMessageEmbedKeys.DECISION_OUTCOME;
|
||||
return getEmbedFieldFromMessageBinding(a0, DECISION_OUTCOME) ?? undefined;
|
||||
}
|
||||
|
||||
function getQuarantineTypeFromMessage(a0) { // fn#43737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:989, offset: 0x0115c229, size: 60 bytes, params: 2, frame: 13
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const QUARANTINE_USER = AutomodMessageEmbedKeys.QUARANTINE_USER;
|
||||
return getEmbedFieldFromMessageBinding(a0, QUARANTINE_USER) ?? undefined;
|
||||
}
|
||||
|
||||
function getQuarantineActionFromMessage(a0) { // fn#43738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:1132, offset: 0x0115c265, size: 60 bytes, params: 2, frame: 13
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const QUARANTINE_USER_ACTION = AutomodMessageEmbedKeys.QUARANTINE_USER_ACTION;
|
||||
return getEmbedFieldFromMessageBinding(a0, QUARANTINE_USER_ACTION) ?? undefined;
|
||||
}
|
||||
|
||||
function getProfileUpdateTypeFromMessage(a0) { // fn#43739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:1284, offset: 0x0115c2a1, size: 60 bytes, params: 2, frame: 13
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const BLOCK_PROFILE_UPDATE_TYPE = AutomodMessageEmbedKeys.BLOCK_PROFILE_UPDATE_TYPE;
|
||||
return getEmbedFieldFromMessageBinding(a0, BLOCK_PROFILE_UPDATE_TYPE) ?? undefined;
|
||||
}
|
||||
|
||||
function getQuarantineEventFromMessage(a0) { // fn#43740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:1440, offset: 0x0115c2dd, size: 60 bytes, params: 2, frame: 13
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const QUARANTINE_EVENT = AutomodMessageEmbedKeys.QUARANTINE_EVENT;
|
||||
return getEmbedFieldFromMessageBinding(a0, QUARANTINE_EVENT) ?? undefined;
|
||||
}
|
||||
|
||||
function _getUserProfileRuleHeaderText(a0, a1, a2) { // fn#43741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:1585, offset: 0x0115c319, size: 754 bytes, params: 4, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const AutomodQuarantineEventMessageEmbedKeys = (require(5055) /* metro dependency 5055: AutomodQuarantineEventMessageEmbedKeys */).AutomodQuarantineEventMessageEmbedKeys;
|
||||
const AutomodBlockProfileUpdateMessageEmbedKeys = (require(5054) /* metro dependency 5054: AutomodBlockProfileUpdateMessageEmbedKeys */).AutomodBlockProfileUpdateMessageEmbedKeys;
|
||||
const value2 = undefined;
|
||||
const AutomodQuarantineUserActionMessageEmbedKeys = (require(5053) /* metro dependency 5053: AutomodQuarantineUserActionMessageEmbedKeys */).AutomodQuarantineUserActionMessageEmbedKeys;
|
||||
const BLOCK_PROFILE_UPDATE = AutomodQuarantineUserActionMessageEmbedKeys.BLOCK_PROFILE_UPDATE;
|
||||
if (BLOCK_PROFILE_UPDATE === a1) {
|
||||
return AutomodBlockProfileUpdateMessageEmbedKeys.NICKNAME_UPDATE === a0 ? intl.string(t.t98DPb) : AutomodBlockProfileUpdateMessageEmbedKeys.NICKNAME_RESET !== a0 ? value2 : intl.string(t['7u/rlU']);
|
||||
}
|
||||
const QUARANTINE_USER = AutomodQuarantineUserActionMessageEmbedKeys.QUARANTINE_USER;
|
||||
if (QUARANTINE_USER === a1) {
|
||||
return AutomodQuarantineEventMessageEmbedKeys.MESSAGE_SEND === a2 ? intl.string(t.PmSMMS) : AutomodQuarantineEventMessageEmbedKeys.GUILD_JOIN === a2 ? intl.string(t.m9wWzo) : AutomodQuarantineEventMessageEmbedKeys.USERNAME_UPDATE === a2 ? intl.string(t.KNSkC6) : AutomodQuarantineEventMessageEmbedKeys.CLAN_TAG_UPDATE !== a2 ? value2 : intl.string(t.qV4K6j);
|
||||
}
|
||||
const BLOCK_GUEST_JOIN = AutomodQuarantineUserActionMessageEmbedKeys.BLOCK_GUEST_JOIN;
|
||||
if (BLOCK_GUEST_JOIN === a1) {
|
||||
return intl.string(t.MrYeyS);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function extractAutomodMessageFields(a0) { // fn#43742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:2812, offset: 0x0115c60b, size: 552 bytes, params: 2, frame: 20
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const value2 = undefined;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const CHANNEL_ID = AutomodMessageEmbedKeys.CHANNEL_ID;
|
||||
const embedFieldFromMessageBinding = getEmbedFieldFromMessageBinding(a0, CHANNEL_ID);
|
||||
const ALERT_ACTIONS_EXECUTION = AutomodMessageEmbedKeys.ALERT_ACTIONS_EXECUTION;
|
||||
const alertActionsExecution = (require(5060) /* metro dependency 5060: AutomodAlert */).parseAlertActionsExecution(getEmbedFieldFromMessageBinding(a0,
|
||||
ALERT_ACTIONS_EXECUTION));
|
||||
const object2 = {};
|
||||
object2.content = getMessageContentFromEmbed(a0);
|
||||
const RULE_NAME = AutomodMessageEmbedKeys.RULE_NAME;
|
||||
object2.ruleName = getEmbedFieldFromMessageBinding(a0, RULE_NAME);
|
||||
const DECISION_ID = AutomodMessageEmbedKeys.DECISION_ID;
|
||||
object2.decisionId = getEmbedFieldFromMessageBinding(a0, DECISION_ID);
|
||||
const KEYWORD = AutomodMessageEmbedKeys.KEYWORD;
|
||||
object2.keyword = getEmbedFieldFromMessageBinding(a0, KEYWORD);
|
||||
const KEYWORD_MATCHED_CONTENT = AutomodMessageEmbedKeys.KEYWORD_MATCHED_CONTENT;
|
||||
object2.keywordMatchedContent = getEmbedFieldFromMessageBinding(a0, KEYWORD_MATCHED_CONTENT);
|
||||
const FLAGGED_MESSAGE_ID = AutomodMessageEmbedKeys.FLAGGED_MESSAGE_ID;
|
||||
object2.flaggedMessageId = getEmbedFieldFromMessageBinding(a0, FLAGGED_MESSAGE_ID);
|
||||
const TIMEOUT_DURATION = AutomodMessageEmbedKeys.TIMEOUT_DURATION;
|
||||
object2.timeoutDuration = getEmbedFieldFromMessageBinding(a0, TIMEOUT_DURATION);
|
||||
const QUARANTINE_USER = AutomodMessageEmbedKeys.QUARANTINE_USER;
|
||||
object2.quarantineType = getEmbedFieldFromMessageBinding(a0, QUARANTINE_USER);
|
||||
const QUARANTINE_USER_ACTION = AutomodMessageEmbedKeys.QUARANTINE_USER_ACTION;
|
||||
object2.quarantineAction = getEmbedFieldFromMessageBinding(a0, QUARANTINE_USER_ACTION);
|
||||
const DECISION_REASON = AutomodMessageEmbedKeys.DECISION_REASON;
|
||||
object2.decisionReason = getEmbedFieldFromMessageBinding(a0, DECISION_REASON);
|
||||
const APPLICATION_NAME = AutomodMessageEmbedKeys.APPLICATION_NAME;
|
||||
object2.applicationName = getEmbedFieldFromMessageBinding(a0, APPLICATION_NAME);
|
||||
const INTERACTION_USER_ID = AutomodMessageEmbedKeys.INTERACTION_USER_ID;
|
||||
object2.interactionUserId = getEmbedFieldFromMessageBinding(a0, INTERACTION_USER_ID);
|
||||
const INTERACTION_CALLBACK_TYPE = AutomodMessageEmbedKeys.INTERACTION_CALLBACK_TYPE;
|
||||
object2.interactionCallbackType = getEmbedFieldFromMessageBinding(a0, INTERACTION_CALLBACK_TYPE);
|
||||
object2.embedChannel = ChannelStore.getChannel(embedFieldFromMessageBinding);
|
||||
object2.embedChannelId = embedFieldFromMessageBinding;
|
||||
object2.alertActionsExecution = alertActionsExecution ?? value2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useAutomodMessageFields(a0) { // fn#43743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:4393, offset: 0x0115c833, size: 132 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const value2 = env0_3.useMemo(_fun43744, [a0]);
|
||||
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun43745,
|
||||
[value2.embedChannelId]);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value2, undefined);
|
||||
object2['embedChannel'] = value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function isAutomodNotification({embeds}) { // fn#43747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:4733, offset: 0x0115c8f2, size: 40 bytes, params: 2, frame: 12
|
||||
return embeds?.some(function({type}) {
|
||||
return type === MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
});
|
||||
}
|
||||
|
||||
function getActionHeaderTextMobile(a0, a1, a2) { // fn#43749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:4892, offset: 0x0115c935, size: 785 bytes, params: 4, frame: 24
|
||||
var r2;
|
||||
var r1;
|
||||
var decisionOutcomeFromMessage;
|
||||
var getEmbedFieldFromMessageBinding;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
var embedFieldFromMessageBinding;
|
||||
var embedFieldFromMessageBinding2;
|
||||
const AutomodDecisionOutcomeEmbedKeys = (require(5057) /* metro dependency 5057: AutomodDecisionOutcomeEmbedKeys */).AutomodDecisionOutcomeEmbedKeys;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var user;
|
||||
const AutomodInteractionCallbackTypeEmbedKeys = (require(5056) /* metro dependency 5056: AutomodInteractionCallbackTypeEmbedKeys */).AutomodInteractionCallbackTypeEmbedKeys;
|
||||
var formatToPlainString;
|
||||
var object2;
|
||||
var username;
|
||||
var property;
|
||||
if (getQuarantineTypeFromMessage(a0) == null) {
|
||||
decisionOutcomeFromMessage = getDecisionOutcomeFromMessage(a0);
|
||||
getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
embedFieldFromMessageBinding = getEmbedFieldFromMessageBinding(a0,
|
||||
AutomodMessageEmbedKeys.INTERACTION_CALLBACK_TYPE);
|
||||
embedFieldFromMessageBinding2 = getEmbedFieldFromMessageBinding(a0, AutomodMessageEmbedKeys.APPLICATION_NAME);
|
||||
if (embedFieldFromMessageBinding2 != null) {
|
||||
user = UserStore.getUser(a2);
|
||||
if (embedFieldFromMessageBinding !== AutomodInteractionCallbackTypeEmbedKeys.MODAL) {
|
||||
r1 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.formatToPlainString(t['0Kmtr7'],
|
||||
|
||||
|
||||
|
||||
{applicationName: embedFieldFromMessageBinding2,
|
||||
integrationOwner: a1.username}) : intl.formatToPlainString(t.I0FiWp,
|
||||
{applicationName: embedFieldFromMessageBinding2, integrationOwner: a1.username});
|
||||
} else if (user != null) {
|
||||
if (decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['Xy2Iw+'];
|
||||
object2 = {applicationName: embedFieldFromMessageBinding2};
|
||||
username = user.username;
|
||||
object2.interactionUser = username;
|
||||
username = a1.username;
|
||||
object2.integrationOwner = username;
|
||||
r2 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['MCK/t7'];
|
||||
object2 = {applicationName: embedFieldFromMessageBinding2};
|
||||
username = user.username;
|
||||
object2.interactionUser = username;
|
||||
username = a1.username;
|
||||
object2.integrationOwner = username;
|
||||
r2 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.formatToPlainString(t['0Kmtr7'],
|
||||
|
||||
|
||||
|
||||
{applicationName: embedFieldFromMessageBinding2,
|
||||
integrationOwner: a1.username}) : intl.formatToPlainString(t.I0FiWp,
|
||||
{applicationName: embedFieldFromMessageBinding2, integrationOwner: a1.username});
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
r2 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.string(t.Oo38tv) : intl.string(t['2kuGkD']);
|
||||
} else {
|
||||
var value6 = _getUserProfileRuleHeaderText(getProfileUpdateTypeFromMessage(a0),
|
||||
getQuarantineActionFromMessage(a0),
|
||||
getQuarantineEventFromMessage(a0));
|
||||
if (value6 != null) {
|
||||
return value6;
|
||||
}
|
||||
decisionOutcomeFromMessage = getDecisionOutcomeFromMessage(a0);
|
||||
getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
embedFieldFromMessageBinding = getEmbedFieldFromMessageBinding(a0,
|
||||
AutomodMessageEmbedKeys.INTERACTION_CALLBACK_TYPE);
|
||||
embedFieldFromMessageBinding2 = getEmbedFieldFromMessageBinding(a0, AutomodMessageEmbedKeys.APPLICATION_NAME);
|
||||
if (embedFieldFromMessageBinding2 != null) {
|
||||
user = UserStore.getUser(a2);
|
||||
if (embedFieldFromMessageBinding !== AutomodInteractionCallbackTypeEmbedKeys.MODAL) {
|
||||
r1 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.formatToPlainString(t['0Kmtr7'],
|
||||
|
||||
|
||||
|
||||
{applicationName: embedFieldFromMessageBinding2,
|
||||
integrationOwner: a1.username}) : intl.formatToPlainString(t.I0FiWp,
|
||||
{applicationName: embedFieldFromMessageBinding2, integrationOwner: a1.username});
|
||||
} else if (user != null) {
|
||||
if (decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['Xy2Iw+'];
|
||||
object2 = {applicationName: embedFieldFromMessageBinding2};
|
||||
username = user.username;
|
||||
object2.interactionUser = username;
|
||||
username = a1.username;
|
||||
object2.integrationOwner = username;
|
||||
r2 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['MCK/t7'];
|
||||
object2 = {applicationName: embedFieldFromMessageBinding2};
|
||||
username = user.username;
|
||||
object2.interactionUser = username;
|
||||
username = a1.username;
|
||||
object2.integrationOwner = username;
|
||||
r2 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.formatToPlainString(t['0Kmtr7'],
|
||||
|
||||
|
||||
|
||||
{applicationName: embedFieldFromMessageBinding2,
|
||||
integrationOwner: a1.username}) : intl.formatToPlainString(t.I0FiWp,
|
||||
{applicationName: embedFieldFromMessageBinding2, integrationOwner: a1.username});
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
r2 = decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.string(t.Oo38tv) : intl.string(t['2kuGkD']);
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
function getActionHeaderText(a0, a1) { // fn#43750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:6202, offset: 0x0115cc46, size: 1136 bytes, params: 3, frame: 29
|
||||
var r14;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var embedFieldFromMessage;
|
||||
const AutomodDecisionOutcomeEmbedKeys = (require(5057) /* metro dependency 5057: AutomodDecisionOutcomeEmbedKeys */).AutomodDecisionOutcomeEmbedKeys;
|
||||
const AutomodInteractionCallbackTypeEmbedKeys = (require(5056) /* metro dependency 5056: AutomodInteractionCallbackTypeEmbedKeys */).AutomodInteractionCallbackTypeEmbedKeys;
|
||||
let value = a2;
|
||||
const r16 = value !== undefined ? value : NOOP_NULL;
|
||||
value = null;
|
||||
const r15 = value != a1 ? (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(a1,
|
||||
UserStore, RelationshipStore) : intl.string(t.J90oLW);
|
||||
const profileUpdateTypeFromMessage = getProfileUpdateTypeFromMessage(a0);
|
||||
const quarantineActionFromMessage = getQuarantineActionFromMessage(a0);
|
||||
const quarantineEventFromMessage = getQuarantineEventFromMessage(a0);
|
||||
const quarantineTypeFromMessage = getQuarantineTypeFromMessage(a0);
|
||||
const decisionOutcomeFromMessage = getDecisionOutcomeFromMessage(a0);
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const AutomodMessageEmbedKeys = (require(5052) /* metro dependency 5052: AutomodMessageEmbedKeys */).AutomodMessageEmbedKeys;
|
||||
const INTERACTION_CALLBACK_TYPE = AutomodMessageEmbedKeys.INTERACTION_CALLBACK_TYPE;
|
||||
const embedFieldFromMessageBinding = getEmbedFieldFromMessageBinding(a0, INTERACTION_CALLBACK_TYPE);
|
||||
const APPLICATION_NAME = AutomodMessageEmbedKeys.APPLICATION_NAME;
|
||||
const embedFieldFromMessageBinding2 = getEmbedFieldFromMessageBinding(a0, APPLICATION_NAME);
|
||||
if (value == quarantineTypeFromMessage) {
|
||||
r14 = value == a1 ? NOOP_NULL : PermissionStore.can(Permissions.VIEW_CHANNEL, a1) ? r16 : NOOP_NULL;
|
||||
embedFieldFromMessage = getEmbedFieldFromMessage(a0, AutomodMessageEmbedKeys.VOICE_CHANNEL_STATUS_OUTCOME);
|
||||
} else {
|
||||
var value13 = _getUserProfileRuleHeaderText(profileUpdateTypeFromMessage, quarantineActionFromMessage,
|
||||
quarantineEventFromMessage);
|
||||
if (value != value13) {
|
||||
return value13;
|
||||
}
|
||||
r14 = value == a1 ? NOOP_NULL : PermissionStore.can(Permissions.VIEW_CHANNEL, a1) ? r16 : NOOP_NULL;
|
||||
embedFieldFromMessage = getEmbedFieldFromMessage(a0, AutomodMessageEmbedKeys.VOICE_CHANNEL_STATUS_OUTCOME);
|
||||
}
|
||||
let r1 = value == embedFieldFromMessage ? value : intl.format(embedFieldFromMessage === 'blocked' ? t.cLQrqz : t.bma6cs,
|
||||
{channelName: r15, channelHook: r16});
|
||||
r1 = value == r1 ? value != embedFieldFromMessageBinding2 ? embedFieldFromMessageBinding !== AutomodInteractionCallbackTypeEmbedKeys.MODAL ? decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.format(t.AXQufN,
|
||||
{applicationName: embedFieldFromMessageBinding2, channelName: r15, channelHook: r14,
|
||||
integrationOwnerHook: a3}) : intl.format(t.s3tjMN, {applicationName: embedFieldFromMessageBinding2,
|
||||
channelName: r15, channelHook: r14,
|
||||
integrationOwnerHook: a3}) : value != a4 ? decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.format(t['4xL9Sk'],
|
||||
{applicationName: embedFieldFromMessageBinding2, interactionUserHook: a4,
|
||||
integrationOwnerHook: a3}) : intl.format(t.S3lNIT, {applicationName: embedFieldFromMessageBinding2,
|
||||
interactionUserHook: a4,
|
||||
integrationOwnerHook: a3}) : decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.format(t.AXQufN,
|
||||
{applicationName: embedFieldFromMessageBinding2, channelName: r15, channelHook: r14,
|
||||
integrationOwnerHook: a3}) : intl.format(t.s3tjMN, {applicationName: embedFieldFromMessageBinding2,
|
||||
channelName: r15, channelHook: r14,
|
||||
integrationOwnerHook: a3}) : decisionOutcomeFromMessage !== AutomodDecisionOutcomeEmbedKeys.BLOCKED ? intl.format(t.IZg0VQ,
|
||||
{channelName: r15, channelHook: r14}) : intl.format(t.lOIOSK, {channelName: r15, channelHook: r14}) : r1;
|
||||
return r1;
|
||||
}
|
||||
|
||||
function getQuarantineReasonString(a0) { // fn#43751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:7950, offset: 0x0115d0b6, size: 443 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const AutomodQuarantineUserMessageEmbedKeys = (require(5058) /* metro dependency 5058: AutomodQuarantineUserMessageEmbedKeys */).AutomodQuarantineUserMessageEmbedKeys;
|
||||
const NICKNAME = AutomodQuarantineUserMessageEmbedKeys.NICKNAME;
|
||||
if (NICKNAME === a0) {
|
||||
return intl.string(t['fkBQa/']);
|
||||
}
|
||||
const USERNAME = AutomodQuarantineUserMessageEmbedKeys.USERNAME;
|
||||
if (USERNAME !== a0) {
|
||||
var GLOBAL_NAME = AutomodQuarantineUserMessageEmbedKeys.GLOBAL_NAME;
|
||||
if (GLOBAL_NAME === a0) {
|
||||
return intl.string(t.V9eJ85);
|
||||
}
|
||||
var CLAN_TAG = AutomodQuarantineUserMessageEmbedKeys.CLAN_TAG;
|
||||
if (CLAN_TAG === a0) {
|
||||
return intl.string(t.Rtum01);
|
||||
}
|
||||
}
|
||||
return intl.string(t.pJQVnr);
|
||||
}
|
||||
|
||||
function extractAutomodNotificationFields(a0) { // fn#43752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:8528, offset: 0x0115d271, size: 469 bytes, params: 2, frame: 22
|
||||
var date;
|
||||
const getEmbedFieldFromMessageBinding = getEmbedFieldFromMessage;
|
||||
const value = undefined;
|
||||
const AutomodNotificationEmbedKeys = (require(5059) /* metro dependency 5059: AutomodNotificationEmbedKeys */).AutomodNotificationEmbedKeys;
|
||||
const NOTIFICATION_TYPE = AutomodNotificationEmbedKeys.NOTIFICATION_TYPE;
|
||||
const embedFieldFromMessageBinding = getEmbedFieldFromMessageBinding(a0, NOTIFICATION_TYPE);
|
||||
const JOIN_ATTEMPTS = AutomodNotificationEmbedKeys.JOIN_ATTEMPTS;
|
||||
const embedFieldFromMessageBinding2 = getEmbedFieldFromMessageBinding(a0, JOIN_ATTEMPTS);
|
||||
const RAID_DATETIME = AutomodNotificationEmbedKeys.RAID_DATETIME;
|
||||
const embedFieldFromMessageBinding3 = getEmbedFieldFromMessageBinding(a0, RAID_DATETIME);
|
||||
const DMS_SENT = AutomodNotificationEmbedKeys.DMS_SENT;
|
||||
const embedFieldFromMessageBinding4 = getEmbedFieldFromMessageBinding(a0, DMS_SENT);
|
||||
const RAID_TYPE = AutomodNotificationEmbedKeys.RAID_TYPE;
|
||||
const embedFieldFromMessageBinding5 = getEmbedFieldFromMessageBinding(a0, RAID_TYPE);
|
||||
const RESOLVED_REASON = AutomodNotificationEmbedKeys.RESOLVED_REASON;
|
||||
const embedFieldFromMessageBinding6 = getEmbedFieldFromMessageBinding(a0, RESOLVED_REASON);
|
||||
const DECISION_ID = AutomodNotificationEmbedKeys.DECISION_ID;
|
||||
const embedFieldFromMessageBinding7 = getEmbedFieldFromMessageBinding(a0, DECISION_ID);
|
||||
const SUSPICIOUS_MENTION_ACTIVITY_UNTIL = AutomodNotificationEmbedKeys.SUSPICIOUS_MENTION_ACTIVITY_UNTIL;
|
||||
const embedFieldFromMessageBinding8 = getEmbedFieldFromMessageBinding(a0, SUSPICIOUS_MENTION_ACTIVITY_UNTIL);
|
||||
const object2 = {};
|
||||
const value10 = null;
|
||||
const r8 = value10 == embedFieldFromMessageBinding ? value10 : embedFieldFromMessageBinding;
|
||||
let r3 = value10 != r8 ? r8 : value;
|
||||
object2.notificationType = r3;
|
||||
object2.joinAttempts = value10 != embedFieldFromMessageBinding2 ? global.parseInt(embedFieldFromMessageBinding2) : value;
|
||||
if (value10 != embedFieldFromMessageBinding3) {
|
||||
date = new global.Date(embedFieldFromMessageBinding3);
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
object2.raidDatetime = r3;
|
||||
object2.dmsSent = value10 != embedFieldFromMessageBinding4 ? global.parseInt(embedFieldFromMessageBinding4) : value;
|
||||
object2.raidType = value10 != embedFieldFromMessageBinding5 ? embedFieldFromMessageBinding5 : value;
|
||||
object2.resolvedReason = value10 != embedFieldFromMessageBinding6 ? embedFieldFromMessageBinding6 : value;
|
||||
object2.decisionId = value10 != embedFieldFromMessageBinding7 ? embedFieldFromMessageBinding7 : value;
|
||||
object2.suspiciousMentionActivityUntil = value10 != embedFieldFromMessageBinding8 ? new global.Date(embedFieldFromMessageBinding8) : value;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getRaidAlertResolveCTAText(a0) { // fn#43754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:9827, offset: 0x0115d473, size: 423 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (a0 == null) {
|
||||
return intl.string(t.Gh3A0O);
|
||||
}
|
||||
const RaidResolutionType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType;
|
||||
const LEGITIMATE_ACTIVITY = RaidResolutionType.LEGITIMATE_ACTIVITY;
|
||||
if (LEGITIMATE_ACTIVITY === a0) {
|
||||
return intl.string(t['riQ+HH']);
|
||||
}
|
||||
const DM_SPAM = RaidResolutionType.DM_SPAM;
|
||||
if (DM_SPAM === a0) {
|
||||
return intl.string(t.j5V0ij);
|
||||
}
|
||||
const JOIN_RAID = RaidResolutionType.JOIN_RAID;
|
||||
if (JOIN_RAID === a0) {
|
||||
return intl.string(t.qhaRbG);
|
||||
}
|
||||
const string = intl.string;
|
||||
const GPg6JM = t.GPg6JM;
|
||||
return Reflect.apply(string, intl, [GPg6JM]);
|
||||
}
|
||||
|
||||
function _fun43745() { // fn#43745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5229:4522, offset: 0x0115c8b7, size: 32 bytes, params: 1, frame: 11
|
||||
return ChannelStore.getChannel(env0_1.embedChannelId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 3790; source: modules/guild_automod/AutomodPermissionUtils.tsx; dependencies: [1945, 3772, 1391, 566, 2] */
|
||||
function _fun28823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:6, offset: 0x00f8431e, size: 232 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = getAutomodQuarantinedProfileFlags;
|
||||
const closure2 = hasAutomodQuarantinedProfile;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const GuildMemberFlags = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
const AUTOMOD_QUARANTINED_BIO = GuildMemberFlags.AUTOMOD_QUARANTINED_BIO;
|
||||
items = [AUTOMOD_QUARANTINED_BIO];
|
||||
const AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME = GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
|
||||
items[1] = AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
|
||||
const AUTOMOD_QUARANTINED_SERVER_TAG = GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG;
|
||||
items[2] = AUTOMOD_QUARANTINED_SERVER_TAG;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodPermissionUtils.tsx');
|
||||
exports.AUTOMOD_QUARANTINED_PROFILE_FLAGS = items;
|
||||
exports.getAutomodQuarantinedProfileFlags = closure;
|
||||
exports.getAutomodQuarantinedGuildMemberFlags = getAutomodQuarantinedGuildMemberFlags;
|
||||
exports.getAutomodReason = function(a0) {
|
||||
return a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) ? GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME : a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_BIO) ? GuildMemberFlags.AUTOMOD_QUARANTINED_BIO : a0.has(GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG) ? GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG : null;
|
||||
};
|
||||
exports.hasAutomodQuarantinedProfile = closure2;
|
||||
exports.useCurrentUserAutomodQuaratinedProfile = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[3]).useStateFromStores([GuildMemberStore], _fun28831, [a0]);
|
||||
};
|
||||
}
|
||||
|
||||
function getAutomodQuarantinedProfileFlags(a0) { // fn#28824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:245, offset: 0x00f84406, size: 103 bytes, params: 2, frame: 14
|
||||
var set;
|
||||
var Set;
|
||||
var value;
|
||||
const env0_0 = a0;
|
||||
if (a0 == null) {
|
||||
set = new global.Set();
|
||||
} else {
|
||||
Set = global.Set;
|
||||
value = env0_4.reduce(_fun28825, []);
|
||||
set = new Set();
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
function hasAutomodQuarantinedProfile(a0) { // fn#28826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:391, offset: 0x00f844bd, size: 58 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
return a0 != null && (a0.flags != null && env0_4.some(_fun28827));
|
||||
}
|
||||
|
||||
function getAutomodQuarantinedGuildMemberFlags(a0) { // fn#28828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:764, offset: 0x00f8453b, size: 60 bytes, params: 2, frame: 11
|
||||
return a0 == null ? new global.Set() : getAutomodQuarantinedProfileFlags(a0.flags);
|
||||
}
|
||||
|
||||
function useCurrentUserAutomodQuaratinedProfile(a0) { // fn#28830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:1280, offset: 0x00f845e8, size: 73 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun28831, [a0]);
|
||||
}
|
||||
|
||||
function _fun28825(a0, a1) { // fn#28825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:332, offset: 0x00f8446d, size: 80 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
if (value.hasFlag(env0_0 ?? 0, a1)) {
|
||||
a0.push(a1);
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun28827(a0) { // fn#28827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:472, offset: 0x00f844f7, size: 68 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
return value.hasFlag(env0_0.flags ?? 0, a0);
|
||||
}
|
||||
|
||||
function _fun28831() { // fn#28831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3917:1370, offset: 0x00f84631, size: 51 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var value3;
|
||||
var hasAutomodQuarantinedProfileBinding;
|
||||
var value;
|
||||
const value2 = env0_0 != null;
|
||||
if (value2) {
|
||||
value3 = environment.__proto__;
|
||||
hasAutomodQuarantinedProfileBinding = hasAutomodQuarantinedProfile;
|
||||
value = GuildMemberStore.getSelfMember(env0_0);
|
||||
value = hasAutomodQuarantinedProfileBinding(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/* Metro module 11463; source: modules/guild_automod/AutomodQuarantineUtils.tsx; dependencies: [31, 7623, 1226, 1945, 1867, 3784, 3969, 661, 3772, 670, 632, 3790, 1244, 7626, 7627, 7007, 2] */
|
||||
function _fun87768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:6, offset: 0x01fca81a, size: 317 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const profileCustomizationNavigationStore = importDefault(7623) /* metro dependency 7623: ProfileCustomizationNavigationStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.Permissions;
|
||||
const env0_10 = constantsModule.UserSettingsSections;
|
||||
const env0_11 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
const env0_12 = (require(670) /* metro dependency 670: UserSettingsConstants */).ProfileCustomizationSubsection;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodQuarantineUtils.tsx');
|
||||
exports.useCurrentUserHasAutomodQuarantinedProfile = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[10]).useStateFromStores([AuthenticationStore, GuildMemberStore], _fun87770, [a0]);
|
||||
};
|
||||
exports.useGuildAutomodProfileQuarantineErrors = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[10]).useStateFromStoresObject([AuthenticationStore, GuildMemberStore,
|
||||
SelectedGuildStore, GuildStore], _fun87772, [a0]);
|
||||
};
|
||||
exports.useOpenFixQuarantinedProfileModal = useOpenFixQuarantinedProfileModal;
|
||||
}
|
||||
|
||||
function useCurrentUserHasAutomodQuarantinedProfile(a0) { // fn#87769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:413, offset: 0x01fca957, size: 83 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore,
|
||||
GuildMemberStore], _fun87770, [a0]);
|
||||
}
|
||||
|
||||
function useGuildAutomodProfileQuarantineErrors(a0) { // fn#87771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:663, offset: 0x01fcaa03, size: 100 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AuthenticationStore,
|
||||
GuildMemberStore, SelectedGuildStore, GuildStore], _fun87772, [a0]);
|
||||
}
|
||||
|
||||
function useOpenFixQuarantinedProfileModal({guildId, scrollPosition, analyticsLocations}) { // fn#87773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:1349, offset: 0x01fcac3e, size: 239 bytes, params: 2, frame: 23
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}, [guildId]);
|
||||
const env0_2 = value2;
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore],
|
||||
_fun87775, [value2]);
|
||||
const value4 = (require(7626) /* metro dependency 7626: UserProfileWYSIWYGEditingExperiment */).useIsEligibleForUserProfileWYSIWYGEditing('AutomodQuarantineUtils');
|
||||
const binding = env0_2;
|
||||
const useCallback = binding.useCallback;
|
||||
return [Reflect.apply(useCallback, binding, [_fun87776, [value3, scrollPosition, analyticsLocations, value2,
|
||||
value4]]), value3];
|
||||
}
|
||||
|
||||
function _fun87770() { // fn#87770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:510, offset: 0x01fca9aa, size: 89 bytes, params: 1, frame: 15
|
||||
if (env0_0 == null) {
|
||||
return false;
|
||||
}
|
||||
const id = AuthenticationStore.getId();
|
||||
const automodPermissionUtilsModule = require(3790) /* metro dependency 3790: AutomodPermissionUtils */;
|
||||
const hasAutomodQuarantinedProfile = automodPermissionUtilsModule.hasAutomodQuarantinedProfile;
|
||||
const getMember = GuildMemberStore.getMember;
|
||||
return Reflect.apply(hasAutomodQuarantinedProfile, automodPermissionUtilsModule, [Reflect.apply(getMember,
|
||||
GuildMemberStore, [env0_0, id])]);
|
||||
}
|
||||
|
||||
function _fun87772() { // fn#87772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:766, offset: 0x01fcaa67, size: 471 bytes, params: 1, frame: 21
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const object2 = {};
|
||||
const value = undefined;
|
||||
object2.nick = value;
|
||||
object2.bio = value;
|
||||
const r3 = env0_0 ?? SelectedGuildStore.getGuildId();
|
||||
const guild = GuildStore.getGuild(r3);
|
||||
if (guild != null) {
|
||||
if (r3 == null) {
|
||||
return object2;
|
||||
}
|
||||
var member = GuildMemberStore.getMember(r3, AuthenticationStore.getId());
|
||||
var automodQuarantinedProfileFlags = (require(3790) /* metro dependency 3790: AutomodPermissionUtils */).getAutomodQuarantinedProfileFlags(member == null ? value : member.flags);
|
||||
if (automodQuarantinedProfileFlags.size === 0) {
|
||||
return object2;
|
||||
}
|
||||
var has = automodQuarantinedProfileFlags.has;
|
||||
var AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME = GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
|
||||
if (Reflect.apply(has, automodQuarantinedProfileFlags, [AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME])) {
|
||||
object2.nick = env0_0 == null ? [intl.formatToPlainString(t.WBUh3O,
|
||||
{guildName: guild.name ?? ''})] : [intl.string(t.EPZCrM)];
|
||||
}
|
||||
has = automodQuarantinedProfileFlags.has;
|
||||
var AUTOMOD_QUARANTINED_BIO = GuildMemberFlags.AUTOMOD_QUARANTINED_BIO;
|
||||
if (Reflect.apply(has, automodQuarantinedProfileFlags, [AUTOMOD_QUARANTINED_BIO])) {
|
||||
object2.bio = [intl.string(t.dZh1vz)];
|
||||
}
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun87775() { // fn#87775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:1541, offset: 0x01fcad2d, size: 51 bytes, params: 1, frame: 14
|
||||
return env0_2 != null && PermissionStore.can(Permissions.CHANGE_NICKNAME, env0_2);
|
||||
}
|
||||
|
||||
function _fun87776() { // fn#87776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11649:1688, offset: 0x01fcad60, size: 178 bytes, params: 1, frame: 16
|
||||
var r7;
|
||||
var value2;
|
||||
var PROFILE_CUSTOMIZATION;
|
||||
var moduleValue;
|
||||
var openUserSettings;
|
||||
if (env0_2 != null) {
|
||||
value2 = environment.__proto__;
|
||||
PROFILE_CUSTOMIZATION = UserSettingsSections.PROFILE_CUSTOMIZATION;
|
||||
if (env0_3) {
|
||||
moduleValue = require(7627) /* metro dependency 7627: GuildIdentityActionCreators */;
|
||||
moduleValue.initGuildIdentitySettings(env0_2.id);
|
||||
r7 = ProfileCustomizationSubsection.GUILD;
|
||||
} else {
|
||||
r7 = ProfileCustomizationSubsection.USER_PROFILE;
|
||||
}
|
||||
openUserSettings = (require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings;
|
||||
ProfileCustomizationNavigationStore.setState({subsection: r7, scrollPosition: scrollPosition});
|
||||
openUserSettings({screen: PROFILE_CUSTOMIZATION});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
/* Metro module 15882; source: modules/guild_automod/AutomodRuleUtils.tsx; dependencies: [1226, 15883, 11454, 15885, 15886, 1244, 7246, 5065, 2] */
|
||||
function _fun122517(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:6, offset: 0x0256ab85, size: 464 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = validateKeywordsOrThrow;
|
||||
const closure2 = validateRegexPatternsOrThrow;
|
||||
const closure3 = isBackendPersistedRule;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_3 = (require(15883) /* metro dependency 15883: AutomodStore */).getRuleCountByTriggerType;
|
||||
const constantsModule = require(11454) /* metro dependency 11454: Constants */;
|
||||
const env0_4 = constantsModule.AutomodTriggerType;
|
||||
const env0_5 = constantsModule.MAX_KEYWORDS_PER_KEYWORD_FILTER;
|
||||
const env0_6 = constantsModule.MAX_REGEX_PATTERNS_PER_KEYWORD_FILTER;
|
||||
const env0_7 = constantsModule.MAX_CHARACTERS_PER_KEYWORD;
|
||||
const env0_8 = constantsModule.MIN_CHARACTERS_PER_KEYWORD;
|
||||
const env0_9 = constantsModule.MIN_REGEX_PATTERN_LENGTH;
|
||||
const env0_10 = constantsModule.MAX_REGEX_PATTERN_LENGTH;
|
||||
const env0_11 = constantsModule.AutomodActionType;
|
||||
const env0_12 = constantsModule.AutomodEventType;
|
||||
const closure4 = function(a0, a1) {
|
||||
return '' + a0 + '-' + a1 + '-new-rule';
|
||||
};
|
||||
const closure5 = isRuleKeywordFilter;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodRuleUtils.tsx');
|
||||
exports.getNewAutomodRuleMockId = closure4;
|
||||
exports.isRuleKeywordFilter = closure5;
|
||||
exports.isRuleMLSpamFilter = isRuleMLSpamFilter;
|
||||
exports.isRuleDefaultKeywordListFilter = isRuleDefaultKeywordListFilter;
|
||||
exports.isRuleMentionSpamFilter = isRuleMentionSpamFilter;
|
||||
exports.isRuleServerPolicyFilter = isRuleServerPolicyFilter;
|
||||
exports.isRuleUserProfileFilter = isRuleUserProfileFilter;
|
||||
exports.createDefaultRule = createDefaultRule;
|
||||
exports.validateKeywordsOrThrow = closure;
|
||||
exports.validateRegexPatternsOrThrow = closure2;
|
||||
exports.validateRuleBeforeSaveOrThrow = validateRuleBeforeSaveOrThrow;
|
||||
exports.isBackendPersistedRule = closure3;
|
||||
exports.eventTypeToName = eventTypeToName;
|
||||
exports.actionTypeToName = actionTypeToName;
|
||||
exports.triggerTypeToName = triggerTypeToName;
|
||||
}
|
||||
|
||||
function validateKeywordsOrThrow(a0, a1) { // fn#122518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:534, offset: 0x0256ad55, size: 137 bytes, params: 3, frame: 17
|
||||
var Error;
|
||||
var value;
|
||||
var intl;
|
||||
if (a0.length > a1) {
|
||||
Error = global.Error;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.mee4qd,
|
||||
{limit: a1});
|
||||
throw new Error();
|
||||
}
|
||||
a0.forEach(_fun122519);
|
||||
}
|
||||
|
||||
function validateRegexPatternsOrThrow(a0) { // fn#122520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:823, offset: 0x0256ae7d, size: 142 bytes, params: 2, frame: 17
|
||||
var Error;
|
||||
var intl;
|
||||
const length = a0.length;
|
||||
var value;
|
||||
if (length > MAX_REGEX_PATTERNS_PER_KEYWORD_FILTER) {
|
||||
Error = global.Error;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tDjhF1,
|
||||
{limit: MAX_REGEX_PATTERNS_PER_KEYWORD_FILTER});
|
||||
throw new Error();
|
||||
}
|
||||
a0.forEach(_fun122521);
|
||||
}
|
||||
|
||||
function isBackendPersistedRule(a0) { // fn#122522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1118, offset: 0x0256afaa, size: 71 bytes, params: 2, frame: 14
|
||||
const value = undefined;
|
||||
const applicationCommandUtilsModule = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
|
||||
return applicationCommandUtilsModule.isSnowflake((a0 == null ? value : a0.id) ?? 'INVALID_SNOWFLAKE');
|
||||
}
|
||||
|
||||
function isRuleKeywordFilter(a0) { // fn#122524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:488, offset: 0x0256b018, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
return triggerType === KEYWORD;
|
||||
}
|
||||
|
||||
function isRuleMLSpamFilter(a0) { // fn#122525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1428, offset: 0x0256b03f, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
return triggerType === ML_SPAM;
|
||||
}
|
||||
|
||||
function isRuleDefaultKeywordListFilter(a0) { // fn#122526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1507, offset: 0x0256b066, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
return triggerType === DEFAULT_KEYWORD_LIST;
|
||||
}
|
||||
|
||||
function isRuleMentionSpamFilter(a0) { // fn#122527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1592, offset: 0x0256b08d, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
return triggerType === MENTION_SPAM;
|
||||
}
|
||||
|
||||
function isRuleServerPolicyFilter(a0) { // fn#122528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1670, offset: 0x0256b0b4, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const SERVER_POLICY = AutomodTriggerType.SERVER_POLICY;
|
||||
return triggerType === SERVER_POLICY;
|
||||
}
|
||||
|
||||
function isRuleUserProfileFilter(a0) { // fn#122529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1748, offset: 0x0256b0db, size: 39 bytes, params: 2, frame: 3
|
||||
const triggerType = a0?.triggerType;
|
||||
const USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
return triggerType === USER_PROFILE;
|
||||
}
|
||||
|
||||
function createDefaultRule(a0, a1) { // fn#122530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:1819, offset: 0x0256b102, size: 397 bytes, params: 3, frame: 19
|
||||
var name;
|
||||
var Error;
|
||||
var intl;
|
||||
var value;
|
||||
const property = (require(15885) /* metro dependency 15885: AutomodTriggerConfigs */).triggerConfigs[a1];
|
||||
const defaultTriggerMetadataForTriggerType = (require(15885) /* metro dependency 15885: AutomodTriggerConfigs */).getDefaultTriggerMetadataForTriggerType(a1,
|
||||
a0);
|
||||
const object2 = {};
|
||||
object2.id = getNewAutomodRuleMockId(a0, a1);
|
||||
object2.name = property.getDefaultRuleName();
|
||||
object2.guildId = a0;
|
||||
object2.eventType = property.eventType;
|
||||
object2.triggerType = a1;
|
||||
object2.triggerMetadata = defaultTriggerMetadataForTriggerType;
|
||||
object2.enabled = true;
|
||||
object2.creatorId = AuthenticationStore.getId();
|
||||
object2.actions = (require(15886) /* metro dependency 15886: AutomodActionUtils */).getRuleDefaultActionsFromConfig(property);
|
||||
object2.position = 0;
|
||||
let Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
let set = new Set();
|
||||
object2.exemptChannels = set instanceof Object ? set : value3;
|
||||
Set = global.Set;
|
||||
const value5 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
object2.exemptRoles = set instanceof Object ? set : value5;
|
||||
if (isBackendPersistedRule(object2)) {
|
||||
Error = global.Error;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/nX8D']);
|
||||
throw new Error();
|
||||
}
|
||||
value = getRuleCountByTriggerType(a0, a1);
|
||||
if (value > 0) {
|
||||
name = object2.name;
|
||||
value += 1;
|
||||
object2.name = name + (' ' + value);
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function validateRuleBeforeSaveOrThrow(a0) { // fn#122531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:2479, offset: 0x0256b28f, size: 301 bytes, params: 2, frame: 17
|
||||
var r6;
|
||||
var r3;
|
||||
var triggerMetadata;
|
||||
var length;
|
||||
var Error;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value;
|
||||
if (isRuleKeywordFilter(a0)) {
|
||||
triggerMetadata = a0.triggerMetadata;
|
||||
r6 = triggerMetadata.keywordFilter ?? [];
|
||||
triggerMetadata = a0.triggerMetadata;
|
||||
r3 = triggerMetadata.regexPatterns ?? [];
|
||||
length = r6.length;
|
||||
if (length !== 0) {
|
||||
validateKeywordsOrThrow(r6, MAX_KEYWORDS_PER_KEYWORD_FILTER);
|
||||
validateRegexPatternsOrThrow(r3);
|
||||
if (a0.actions.length === 0) {
|
||||
Error = global.Error;
|
||||
value = intl.string(t['t+gj5V']);
|
||||
throw new Error();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
length = r3.length;
|
||||
if (length === 0) {
|
||||
Error = global.Error;
|
||||
value = intl.string(t.kz2Av3);
|
||||
throw new Error();
|
||||
}
|
||||
validateKeywordsOrThrow(r6, MAX_KEYWORDS_PER_KEYWORD_FILTER);
|
||||
validateRegexPatternsOrThrow(r3);
|
||||
length = a0.actions.length;
|
||||
if (length === 0) {
|
||||
Error = global.Error;
|
||||
value = intl.string(t['t+gj5V']);
|
||||
throw new Error();
|
||||
}
|
||||
} else if (a0.actions.length === 0) {
|
||||
Error = global.Error;
|
||||
value = intl.string(t['t+gj5V']);
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
function eventTypeToName(a0) { // fn#122532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:2949, offset: 0x0256b3bc, size: 218 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
if (MESSAGE_SEND === a0) {
|
||||
return intl.string(t.NlQW4P);
|
||||
}
|
||||
const GUILD_MEMBER_JOIN_OR_UPDATE = AutomodEventType.GUILD_MEMBER_JOIN_OR_UPDATE;
|
||||
if (GUILD_MEMBER_JOIN_OR_UPDATE === a0) {
|
||||
return intl.string(t['Q+68IX']);
|
||||
}
|
||||
const string = intl.string;
|
||||
const SP9BBx = t.SP9BBx;
|
||||
return Reflect.apply(string, intl, [SP9BBx]);
|
||||
}
|
||||
|
||||
function actionTypeToName(a0) { // fn#122533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:3209, offset: 0x0256b496, size: 374 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
if (BLOCK_MESSAGE === a0) {
|
||||
return intl.string(t.d1ab8n);
|
||||
}
|
||||
const FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
if (FLAG_TO_CHANNEL === a0) {
|
||||
return intl.string(t['Y+VmvU']);
|
||||
}
|
||||
const USER_COMMUNICATION_DISABLED = AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
if (USER_COMMUNICATION_DISABLED === a0) {
|
||||
return intl.string(t['6WPxY2']);
|
||||
}
|
||||
const QUARANTINE_USER = AutomodActionType.QUARANTINE_USER;
|
||||
if (QUARANTINE_USER === a0) {
|
||||
return intl.string(t.NPO8ee);
|
||||
}
|
||||
const string = intl.string;
|
||||
const SP9BBx = t.SP9BBx;
|
||||
return Reflect.apply(string, intl, [SP9BBx]);
|
||||
}
|
||||
|
||||
function triggerTypeToName(a0) { // fn#122534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:3611, offset: 0x0256b60c, size: 442 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
if (KEYWORD === a0) {
|
||||
return intl.string(t.ffR2cM);
|
||||
}
|
||||
const ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
if (ML_SPAM === a0) {
|
||||
return intl.string(t['puF/Os']);
|
||||
}
|
||||
const DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
if (DEFAULT_KEYWORD_LIST === a0) {
|
||||
return intl.string(t.LnGhZv);
|
||||
}
|
||||
const MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
if (MENTION_SPAM === a0) {
|
||||
return intl.string(t.pX7i6n);
|
||||
}
|
||||
const USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
if (USER_PROFILE === a0) {
|
||||
return intl.string(t.q1L2v8);
|
||||
}
|
||||
const string = intl.string;
|
||||
const SP9BBx = t.SP9BBx;
|
||||
return Reflect.apply(string, intl, [SP9BBx]);
|
||||
}
|
||||
|
||||
function _fun122519(a0) { // fn#122519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:675, offset: 0x0256adde, size: 159 bytes, params: 2, frame: 18
|
||||
const InvalidKeywordError = (require(7246) /* metro dependency 7246: AutomodErrorUtils */).InvalidKeywordError;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const length = a0.length;
|
||||
const value = environment.__proto__;
|
||||
if (length > MAX_CHARACTERS_PER_KEYWORD) {
|
||||
throw new InvalidKeywordError(intl.formatToPlainString(t.rbRvGe, {keyword: a0, max: MAX_CHARACTERS_PER_KEYWORD,
|
||||
min: MIN_CHARACTERS_PER_KEYWORD}));
|
||||
}
|
||||
if (a0.length < MIN_CHARACTERS_PER_KEYWORD) {
|
||||
throw new InvalidKeywordError(intl.formatToPlainString(t.rbRvGe, {keyword: a0, max: MAX_CHARACTERS_PER_KEYWORD,
|
||||
min: MIN_CHARACTERS_PER_KEYWORD}));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun122521(a0) { // fn#122521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16090:967, offset: 0x0256af0b, size: 159 bytes, params: 2, frame: 18
|
||||
const InvalidRegexPatternError = (require(7246) /* metro dependency 7246: AutomodErrorUtils */).InvalidRegexPatternError;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const length = a0.length;
|
||||
const value = environment.__proto__;
|
||||
if (length > MAX_REGEX_PATTERN_LENGTH) {
|
||||
throw new InvalidRegexPatternError(intl.formatToPlainString(t.WR0m9w, {regex: a0, max: MAX_REGEX_PATTERN_LENGTH,
|
||||
min: MIN_REGEX_PATTERN_LENGTH}));
|
||||
}
|
||||
if (a0.length < MIN_REGEX_PATTERN_LENGTH) {
|
||||
throw new InvalidRegexPatternError(intl.formatToPlainString(t.WR0m9w, {regex: a0, max: MAX_REGEX_PATTERN_LENGTH,
|
||||
min: MIN_REGEX_PATTERN_LENGTH}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,420 @@
|
||||
/* Metro module 15883; source: modules/guild_automod/AutomodStore.tsx; dependencies: [57, 5, 31, 11454, 661, 685, 15884, 690, 11459, 4131, 3769, 2] */
|
||||
function _fun122535(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:6, offset: 0x0256b7c6, size: 290 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = useSyncAutomodRules;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(11454) /* metro dependency 11454: Constants */).AutomodTriggerType;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_7 = {};
|
||||
let value = require(685) /* metro dependency 685 */;
|
||||
value = value.createWithEqualityFn(_fun122540);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodStore.tsx');
|
||||
exports.useAutomodStore = value;
|
||||
exports.getRuleCountByTriggerType = getRuleCountByTriggerType;
|
||||
exports.useSyncAutomodRules = closure;
|
||||
exports.useSyncAutomodRulesEffect = useSyncAutomodRulesEffect;
|
||||
exports.useAutomodRulesList = useAutomodRulesList;
|
||||
}
|
||||
|
||||
function useSyncAutomodRules(a0) { // fn#122536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1427, offset: 0x0256b8e8, size: 190 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
let binding = env0_4;
|
||||
const [property, env0_1] = env0_2(binding.useState(false), 2);
|
||||
const value5 = env0_2(env0_8(function(a0) {
|
||||
return [a0.syncRules, a0.fetching];
|
||||
}, (require(3769) /* metro dependency 3769 */).shallow), 2);
|
||||
const property2 = value5[0];
|
||||
const property3 = value5[1];
|
||||
const env0_3 = property3;
|
||||
const items2 = [property];
|
||||
binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
items2[1] = Reflect.apply(useCallback, binding, [env0_3(_fun122539), [a0, property3, property2]]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun122540(a0, a1) { // fn#122540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:234, offset: 0x0256ba41, size: 101 bytes, params: 3, frame: 13
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const object2 = {'rules': null, 'fetching': false, 'error': null};
|
||||
object2.rules = {};
|
||||
object2.updateRule = updateRule;
|
||||
object2.removeRule = removeRule;
|
||||
const env0_2 = env0_3(_fun122551);
|
||||
object2.syncRules = syncRules;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getRuleCountByTriggerType(a0, a1) { // fn#122557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1803, offset: 0x0256bf88, size: 63 bytes, params: 3, frame: 11
|
||||
const binding = env0_8;
|
||||
const getState = binding.getState;
|
||||
let r0 = Reflect.apply(getState, binding, []).rules[a0]?.[a1];
|
||||
r0 = r0 ?? [];
|
||||
return r0.length;
|
||||
}
|
||||
|
||||
function useSyncAutomodRulesEffect(a0) { // fn#122558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1966, offset: 0x0256bfc7, size: 97 bytes, params: 2, frame: 16
|
||||
const value3 = env0_2(useSyncAutomodRules(a0), 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
env0_4.useEffect(_fun122559, [a0, property2]);
|
||||
return [property, property2];
|
||||
}
|
||||
|
||||
function useAutomodRulesList(a0) { // fn#122562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:2150, offset: 0x0256c077, size: 59 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_8(_fun122563, (require(3769) /* metro dependency 3769 */).shallow);
|
||||
}
|
||||
|
||||
function* _fun122539() { // fn#122539, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1604, offset: 0x0256b9ce, size: 115 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (!env1_3) {
|
||||
if (require == null) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
dependencyMap(true);
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding = env1_2;
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value3 = binding(require);
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
dependencyMap(false);
|
||||
throw error;
|
||||
}
|
||||
if (value5) {
|
||||
dependencyMap(false);
|
||||
return value4;
|
||||
}
|
||||
dependencyMap(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateRule(a0) { // fn#122541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:292, offset: 0x0256baa6, size: 220 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var items;
|
||||
const env0_0 = a0;
|
||||
const guildId = a0.guildId;
|
||||
const env0_2 = a0.id;
|
||||
const triggerType = a0.triggerType;
|
||||
let property = require().rules[guildId];
|
||||
property = (property ?? ({}))[triggerType];
|
||||
const r6 = property ?? [];
|
||||
let value = r6.some(function({id}) {
|
||||
return id === id;
|
||||
});
|
||||
const value2 = r6.filter(_fun122543);
|
||||
if (value) {
|
||||
value = value2.map(_fun122544);
|
||||
} else {
|
||||
items = [];
|
||||
value = arraySpread(items, value2, 0, r6);
|
||||
items[value] = a0;
|
||||
value + 1;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun122545);
|
||||
}
|
||||
|
||||
function removeRule(a0, a1) { // fn#122546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:612, offset: 0x0256bc30, size: 133 bytes, params: 3, frame: 15
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const property = require().rules[a1];
|
||||
const Object = global.Object;
|
||||
const env0_4 = Object.keys(property).reduce(_fun122547, {});
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun122549);
|
||||
}
|
||||
|
||||
function* _fun122551(a0) { // fn#122551, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:842, offset: 0x0256bd3d, size: 333 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var binding;
|
||||
var binding2;
|
||||
var fetchAutomodRules;
|
||||
var value5;
|
||||
var closure;
|
||||
var rules;
|
||||
var binding3;
|
||||
var batchUpdates;
|
||||
var error;
|
||||
var binding4;
|
||||
var APIError;
|
||||
var prototype;
|
||||
var aPIError;
|
||||
if (true) {
|
||||
var env0_0 = a0;
|
||||
var env0_1;
|
||||
var env0_2;
|
||||
var env0_3;
|
||||
var Date = global.Date;
|
||||
var now = Date.now;
|
||||
value = Reflect.apply(now, Date, []);
|
||||
var property = env2_7[a0];
|
||||
reduciblePort32: while (true) {
|
||||
exceptionLanding31: while (true) {
|
||||
if (value - (property ?? 0) > 20000) {
|
||||
binding = env2_7;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
binding[a0] = Reflect.apply(now, Date, []);
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
property = binding2[8];
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
fetchAutomodRules = value.fetchAutomodRules;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(fetchAutomodRules, value, [a0]);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
if (value5) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
closure = _fun122552;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
value = closure(value);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
env0_1 = value;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
value = dependencyMap();
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
rules = value.rules;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
env0_2 = rules;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
property = binding3[7];
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
batchUpdates = value.batchUpdates;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
closure = _fun122554;
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(batchUpdates, value, [closure]);
|
||||
} catch (error) {
|
||||
break exceptionLanding31;
|
||||
}
|
||||
break reduciblePort32;
|
||||
}
|
||||
break reduciblePort32;
|
||||
}
|
||||
binding = env2_0;
|
||||
binding4 = env2_1;
|
||||
APIError = binding(binding4[9]).APIError;
|
||||
prototype = APIError.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: APIError}});
|
||||
aPIError = new APIError();
|
||||
value = aPIError instanceof Object ? aPIError : value;
|
||||
env0_3 = value;
|
||||
value = binding(binding4[7]);
|
||||
batchUpdates = value.batchUpdates;
|
||||
Reflect.apply(batchUpdates, value, [_fun122555]);
|
||||
break reduciblePort32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun122559() { // fn#122559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:2076, offset: 0x0256c028, size: 29 bytes, params: 1, frame: 11
|
||||
env1_3(_fun122561)();
|
||||
}
|
||||
|
||||
function _fun122563({rules, updateRule, removeRule}) { // fn#122563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:2192, offset: 0x0256c0b2, size: 78 bytes, params: 2, frame: 7
|
||||
return {rulesByTriggerType: rules[env0_0 ?? EMPTY_STRING_SNOWFLAKE_ID] ?? ({}), updateRule: updateRule,
|
||||
removeRule: removeRule};
|
||||
}
|
||||
|
||||
function _fun122543(a0) { // fn#122543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:431, offset: 0x0256bb82, size: 69 bytes, params: 2, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = Reflect.apply((require(15884) /* metro dependency 15884: SystemRulesUtils */).isDefaultRuleId, value,
|
||||
[a0.id]);
|
||||
return value ? a0.triggerType !== triggerType : !value;
|
||||
}
|
||||
|
||||
function _fun122544(a0) { // fn#122544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:497, offset: 0x0256bbc7, size: 25 bytes, params: 2, frame: 4
|
||||
const value = a0;
|
||||
return value.id !== id ? value : env0_0;
|
||||
}
|
||||
|
||||
function _fun122545() { // fn#122545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:546, offset: 0x0256bbe0, size: 80 bytes, params: 1, frame: 16
|
||||
const binding = env1_0;
|
||||
const object = {};
|
||||
copyDataProperties(object, rules, undefined);
|
||||
const guildIdBinding = guildId;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, env0_5, undefined);
|
||||
object4[triggerType] = env0_6;
|
||||
object[guildIdBinding] = object4;
|
||||
binding({rules: object, error: null});
|
||||
}
|
||||
|
||||
function _fun122547(a0, a1) { // fn#122547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:668, offset: 0x0256bcb5, size: 67 bytes, params: 3, frame: 13
|
||||
const Number = global.Number;
|
||||
const value = Number(a1);
|
||||
const r4 = env0_3[value] ?? [];
|
||||
a0[value] = r4.filter(_fun122548);
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun122549() { // fn#122549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:782, offset: 0x0256bcf8, size: 58 bytes, params: 1, frame: 14
|
||||
const binding = env1_0;
|
||||
const object = {};
|
||||
copyDataProperties(object, rules, undefined);
|
||||
object[require] = env0_4;
|
||||
binding({rules: object, error: null});
|
||||
}
|
||||
|
||||
function _fun122552(a0) { // fn#122552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:964, offset: 0x0256be8a, size: 127 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
const binding = env3_5;
|
||||
const KEYWORD = binding.KEYWORD;
|
||||
object2[KEYWORD] = [];
|
||||
const ML_SPAM = binding.ML_SPAM;
|
||||
object2[ML_SPAM] = [];
|
||||
const DEFAULT_KEYWORD_LIST = binding.DEFAULT_KEYWORD_LIST;
|
||||
object2[DEFAULT_KEYWORD_LIST] = [];
|
||||
const MENTION_SPAM = binding.MENTION_SPAM;
|
||||
object2[MENTION_SPAM] = [];
|
||||
const USER_PROFILE = binding.USER_PROFILE;
|
||||
object2[USER_PROFILE] = [];
|
||||
const SERVER_POLICY = binding.SERVER_POLICY;
|
||||
object2[SERVER_POLICY] = [];
|
||||
a0.forEach(_fun122553);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun122554() { // fn#122554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1242, offset: 0x0256bf31, size: 58 bytes, params: 1, frame: 14
|
||||
const object = {};
|
||||
copyDataProperties(object, rules, undefined);
|
||||
object[env0_0] = env0_1;
|
||||
require({rules: object, error: null});
|
||||
}
|
||||
|
||||
function _fun122555() { // fn#122555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1347, offset: 0x0256bf6b, size: 29 bytes, params: 1, frame: 11
|
||||
require({error: env0_3});
|
||||
}
|
||||
|
||||
function* _fun122561() { // fn#122561, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:2084, offset: 0x0256c050, size: 39 bytes, params: 1, frame: 11
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
yield require();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun122553(a0) { // fn#122553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16091:1113, offset: 0x0256bf09, size: 40 bytes, params: 2, frame: 11
|
||||
const property = env0_0[a0.triggerType];
|
||||
if (property != null) {
|
||||
property.push(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
/* Metro module 15885; source: modules/guild_automod/AutomodTriggerConfigs.tsx; dependencies: [31, 11454, 1244, 15195, 10925, 2] */
|
||||
function _fun122566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:6, offset: 0x0256c19e, size: 1736 bytes, params: 8, frame: 27
|
||||
var object12;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(11454) /* metro dependency 11454: Constants */;
|
||||
const AutomodActionType = constantsModule.AutomodActionType;
|
||||
const AutomodEventType = constantsModule.AutomodEventType;
|
||||
const AutomodTriggerType = constantsModule.AutomodTriggerType;
|
||||
const env0_4 = constantsModule.MENTION_SPAM_LIMIT_DEFAULT;
|
||||
object12 = {NEW: 'new', RECOMMENDED: 'recommended', BETA: 'beta', ALPHA: 'alpha'};
|
||||
const object13 = {};
|
||||
const SPAM_LINK = AutomodTriggerType.SPAM_LINK;
|
||||
const object14 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.ffR2cM);
|
||||
}};
|
||||
const SPAM_LINK2 = AutomodTriggerType.SPAM_LINK;
|
||||
object14.type = SPAM_LINK2;
|
||||
let MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object14.eventType = MESSAGE_SEND;
|
||||
object14.perGuildMaxCount = 0;
|
||||
let Set = global.Set;
|
||||
object14.availableActionTypes = new Set();
|
||||
Set = global.Set;
|
||||
object14.flags = new Set();
|
||||
Set = global.Set;
|
||||
object14.defaultActionTypes = new Set();
|
||||
object13[SPAM_LINK] = object14;
|
||||
let KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
const object15 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.ffR2cM);
|
||||
}};
|
||||
const KEYWORD2 = AutomodTriggerType.KEYWORD;
|
||||
object15.type = KEYWORD2;
|
||||
MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object15.eventType = MESSAGE_SEND;
|
||||
object15.perGuildMaxCount = 6;
|
||||
Set = global.Set;
|
||||
let BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
let FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
let USER_COMMUNICATION_DISABLED = AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
object15.availableActionTypes = new Set([BLOCK_MESSAGE, FLAG_TO_CHANNEL, USER_COMMUNICATION_DISABLED]);
|
||||
Set = global.Set;
|
||||
object15.flags = new Set();
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
object15.defaultActionTypes = new Set([BLOCK_MESSAGE]);
|
||||
object13[KEYWORD] = object15;
|
||||
let ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
const object16 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['puF/Os']);
|
||||
}};
|
||||
const ML_SPAM2 = AutomodTriggerType.ML_SPAM;
|
||||
object16.type = ML_SPAM2;
|
||||
MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object16.eventType = MESSAGE_SEND;
|
||||
object16.perGuildMaxCount = 1;
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
object16.availableActionTypes = new Set([BLOCK_MESSAGE, FLAG_TO_CHANNEL]);
|
||||
Set = global.Set;
|
||||
object16.flags = new Set([]);
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
object16.defaultActionTypes = new Set([BLOCK_MESSAGE]);
|
||||
object13[ML_SPAM] = object16;
|
||||
let DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
const object17 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.LnGhZv);
|
||||
}};
|
||||
const DEFAULT_KEYWORD_LIST2 = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
object17.type = DEFAULT_KEYWORD_LIST2;
|
||||
MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object17.eventType = MESSAGE_SEND;
|
||||
object17.perGuildMaxCount = 1;
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
object17.availableActionTypes = new Set([BLOCK_MESSAGE, FLAG_TO_CHANNEL]);
|
||||
Set = global.Set;
|
||||
object17.flags = new Set([]);
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
object17.defaultActionTypes = new Set([BLOCK_MESSAGE]);
|
||||
object13[DEFAULT_KEYWORD_LIST] = object17;
|
||||
let MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
const object18 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.pX7i6n);
|
||||
}};
|
||||
const MENTION_SPAM2 = AutomodTriggerType.MENTION_SPAM;
|
||||
object18.type = MENTION_SPAM2;
|
||||
MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object18.eventType = MESSAGE_SEND;
|
||||
object18.perGuildMaxCount = 1;
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
USER_COMMUNICATION_DISABLED = AutomodActionType.USER_COMMUNICATION_DISABLED;
|
||||
object18.availableActionTypes = new Set([BLOCK_MESSAGE, FLAG_TO_CHANNEL, USER_COMMUNICATION_DISABLED]);
|
||||
Set = global.Set;
|
||||
object18.flags = new Set([]);
|
||||
Set = global.Set;
|
||||
BLOCK_MESSAGE = AutomodActionType.BLOCK_MESSAGE;
|
||||
object18.defaultActionTypes = new Set([BLOCK_MESSAGE]);
|
||||
object13[MENTION_SPAM] = object18;
|
||||
let USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
const object19 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.q1L2v8);
|
||||
}};
|
||||
const USER_PROFILE2 = AutomodTriggerType.USER_PROFILE;
|
||||
object19.type = USER_PROFILE2;
|
||||
const GUILD_MEMBER_JOIN_OR_UPDATE = AutomodEventType.GUILD_MEMBER_JOIN_OR_UPDATE;
|
||||
object19.eventType = GUILD_MEMBER_JOIN_OR_UPDATE;
|
||||
object19.perGuildMaxCount = 1;
|
||||
Set = global.Set;
|
||||
let QUARANTINE_USER = AutomodActionType.QUARANTINE_USER;
|
||||
FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
object19.availableActionTypes = new Set([QUARANTINE_USER, FLAG_TO_CHANNEL]);
|
||||
Set = global.Set;
|
||||
object19.flags = new Set([]);
|
||||
Set = global.Set;
|
||||
QUARANTINE_USER = AutomodActionType.QUARANTINE_USER;
|
||||
object19.defaultActionTypes = new Set([QUARANTINE_USER]);
|
||||
object13[USER_PROFILE] = object19;
|
||||
let SERVER_POLICY = AutomodTriggerType.SERVER_POLICY;
|
||||
const object20 = {getDefaultRuleName: function() {
|
||||
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.ZQr92M);
|
||||
}};
|
||||
const SERVER_POLICY2 = AutomodTriggerType.SERVER_POLICY;
|
||||
object20.type = SERVER_POLICY2;
|
||||
MESSAGE_SEND = AutomodEventType.MESSAGE_SEND;
|
||||
object20.eventType = MESSAGE_SEND;
|
||||
object20.perGuildMaxCount = 1;
|
||||
Set = global.Set;
|
||||
FLAG_TO_CHANNEL = AutomodActionType.FLAG_TO_CHANNEL;
|
||||
object20.availableActionTypes = new Set([FLAG_TO_CHANNEL]);
|
||||
Set = global.Set;
|
||||
const ALPHA = object12.ALPHA;
|
||||
object20.flags = new Set([ALPHA]);
|
||||
Set = global.Set;
|
||||
object20.defaultActionTypes = new Set();
|
||||
object13[SERVER_POLICY] = object20;
|
||||
const object21 = {MEMBERS: 'members', CONTENT: 'content'};
|
||||
const object22 = {};
|
||||
const MEMBERS = object21.MEMBERS;
|
||||
USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
object22[MEMBERS] = [object13[USER_PROFILE]];
|
||||
const CONTENT = object21.CONTENT;
|
||||
SERVER_POLICY = AutomodTriggerType.SERVER_POLICY;
|
||||
MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
object22[CONTENT] = [object13[SERVER_POLICY], object13[MENTION_SPAM], object13[ML_SPAM],
|
||||
object13[DEFAULT_KEYWORD_LIST], object13[KEYWORD]];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/AutomodTriggerConfigs.tsx');
|
||||
exports.AutomodTriggerConfigFlags = object12;
|
||||
exports.triggerConfigs = object13;
|
||||
exports.AutomodTriggerCategory = object21;
|
||||
exports.AUTOMOD_RULE_CONFIGS_BY_CATEGORY = object22;
|
||||
exports.checkTriggerTypeForFlag = checkTriggerTypeForFlag;
|
||||
exports.getAvailableActionTypes = getAvailableActionTypes;
|
||||
exports.validateRuleByTriggerConfigOrThrow = validateRuleByTriggerConfigOrThrow;
|
||||
exports.useAvailableTriggerTypes = useAvailableTriggerTypes;
|
||||
exports.getDefaultTriggerMetadataForTriggerType = getDefaultTriggerMetadataForTriggerType;
|
||||
}
|
||||
|
||||
function checkTriggerTypeForFlag(a0, a1) { // fn#122574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:2642, offset: 0x0256c9dc, size: 34 bytes, params: 3, frame: 11
|
||||
return env0_5[a0].flags.has(a1);
|
||||
}
|
||||
|
||||
function getAvailableActionTypes(a0) { // fn#122575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:2693, offset: 0x0256c9fe, size: 40 bytes, params: 2, frame: 12
|
||||
const Array = global.Array;
|
||||
return Array.from(env0_5[a0].availableActionTypes);
|
||||
}
|
||||
|
||||
function validateRuleByTriggerConfigOrThrow({id, eventType, triggerType, actions}, a1) { // fn#122576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:2812, offset: 0x0256ca26, size: 245 bytes, params: 3, frame: 16
|
||||
var Error;
|
||||
var value;
|
||||
const property = env0_5[triggerType];
|
||||
if (a1.filter(_fun122577).length > property.perGuildMaxCount) {
|
||||
Error = global.Error;
|
||||
value = 'You have exceeded the maximum number of rules of type ' + triggerType;
|
||||
throw new Error();
|
||||
}
|
||||
if (actions.some(_fun122578)) {
|
||||
throw new global.Error('You have provided an action that is not available for this trigger type');
|
||||
}
|
||||
if (eventType !== property.eventType) {
|
||||
throw new global.Error('You have provided an event type that is not available for this trigger type');
|
||||
}
|
||||
}
|
||||
|
||||
function useAvailableTriggerTypes(a0) { // fn#122579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3348, offset: 0x0256cb65, size: 77 bytes, params: 2, frame: 14
|
||||
return env0_2.useMemo(_fun122580,
|
||||
[(require(15195) /* metro dependency 15195: PermissionUtils */).useIsUserProfileRuleEnabled(a0)]);
|
||||
}
|
||||
|
||||
function getDefaultTriggerMetadataForTriggerType(a0, a1) { // fn#122584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3722, offset: 0x0256cc94, size: 204 bytes, params: 3, frame: 14
|
||||
const isInMentionRaidExperiment2 = (require(10925) /* metro dependency 10925: ExperimentUtils */).isInMentionRaidExperiment(a1);
|
||||
const DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
if (DEFAULT_KEYWORD_LIST === a0) {
|
||||
return {allowList: [], presets: []};
|
||||
}
|
||||
const USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
if (USER_PROFILE === a0) {
|
||||
return {keywordFilter: [], regexPatterns: [], allowList: []};
|
||||
}
|
||||
const KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
if (KEYWORD === a0) {
|
||||
return {keywordFilter: [], regexPatterns: [], allowList: []};
|
||||
}
|
||||
const MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
if (MENTION_SPAM === a0) {
|
||||
return {mentionTotalLimit: MENTION_SPAM_LIMIT_DEFAULT,
|
||||
mentionRaidProtectionEnabled: isInMentionRaidExperiment2};
|
||||
}
|
||||
const ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
if (ML_SPAM !== a0) {
|
||||
AutomodTriggerType.SERVER_POLICY;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun122577(a0) { // fn#122577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:2926, offset: 0x0256cb1b, size: 38 bytes, params: 2, frame: 4
|
||||
return id !== a0.id && a0.triggerType === triggerType;
|
||||
}
|
||||
|
||||
function _fun122578({type}) { // fn#122578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3074, offset: 0x0256cb41, size: 36 bytes, params: 2, frame: 11
|
||||
const availableActionTypes = env0_2.availableActionTypes;
|
||||
return !availableActionTypes.has(type);
|
||||
}
|
||||
|
||||
function _fun122580() { // fn#122580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3448, offset: 0x0256cbb2, size: 84 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const {MEMBERS, CONTENT} = env1_6;
|
||||
const Object = global.Object;
|
||||
return Object.keys(env1_7).reduce(_fun122581, {[MEMBERS]: [], [CONTENT]: []});
|
||||
}
|
||||
|
||||
function _fun122581(a0, a1) { // fn#122581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3521, offset: 0x0256cc06, size: 59 bytes, params: 3, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = env2_7[a1].filter(_fun122582);
|
||||
a0[a1] = value.map(function(a0) {
|
||||
return a0.type;
|
||||
});
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun122582(a0) { // fn#122582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16093:3548, offset: 0x0256cc41, size: 83 bytes, params: 2, frame: 4
|
||||
var r3;
|
||||
var r0;
|
||||
const type = a0.type;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const SERVER_POLICY = AutomodTriggerType.SERVER_POLICY;
|
||||
const value2 = type !== SERVER_POLICY;
|
||||
if (value2) {
|
||||
value = a0.type === AutomodTriggerType.USER_PROFILE;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = !env2_0;
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
value = !r3;
|
||||
r0 = r3 ? value : a0.perGuildMaxCount > 0;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 11454; source: modules/guild_automod/Constants.tsx; dependencies: [11455, 2, 11456, 11457] */
|
||||
function _fun87701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11640:6, offset: 0x01fc84bb, size: 513 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {PROFANITY: 1};
|
||||
object2[1] = 'PROFANITY';
|
||||
object2.SEXUAL_CONTENT = 2;
|
||||
object2[2] = 'SEXUAL_CONTENT';
|
||||
object2.SLURS = 3;
|
||||
object2[3] = 'SLURS';
|
||||
const AutomodTriggerType = (require(11455) /* metro dependency 11455: AutomodTriggerType */).AutomodTriggerType;
|
||||
const USER_PROFILE = AutomodTriggerType.USER_PROFILE;
|
||||
const items2 = [USER_PROFILE];
|
||||
const SERVER_POLICY = AutomodTriggerType.SERVER_POLICY;
|
||||
items2[1] = SERVER_POLICY;
|
||||
const MENTION_SPAM = AutomodTriggerType.MENTION_SPAM;
|
||||
items2[2] = MENTION_SPAM;
|
||||
const ML_SPAM = AutomodTriggerType.ML_SPAM;
|
||||
items2[3] = ML_SPAM;
|
||||
const DEFAULT_KEYWORD_LIST = AutomodTriggerType.DEFAULT_KEYWORD_LIST;
|
||||
items2[4] = DEFAULT_KEYWORD_LIST;
|
||||
const KEYWORD = AutomodTriggerType.KEYWORD;
|
||||
items2[5] = KEYWORD;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/Constants.tsx');
|
||||
const AutomodEventType = (require(11456) /* metro dependency 11456: AutomodEventType */).AutomodEventType;
|
||||
exports.AutomodEventType = AutomodEventType;
|
||||
exports.AutomodTriggerType = AutomodTriggerType;
|
||||
const AutomodActionType = (require(11457) /* metro dependency 11457: AutomodActionType */).AutomodActionType;
|
||||
exports.AutomodActionType = AutomodActionType;
|
||||
exports.KeywordPreset = object2;
|
||||
exports.AUTOMOD_TRIGGER_TYPES = items2;
|
||||
exports.MAX_KEYWORDS_PER_KEYWORD_FILTER = 1000;
|
||||
exports.MAX_KEYWORDS_PER_ALLOWLIST_KEYWORD_FILTER_RULE = 100;
|
||||
exports.MAX_KEYWORDS_PER_ALLOWLIST_DEFAULT_KEYWORD_RULE = 1000;
|
||||
exports.MAX_REGEX_PATTERNS_PER_KEYWORD_FILTER = 10;
|
||||
exports.MAX_CHARACTERS_PER_KEYWORD = 60;
|
||||
exports.MIN_CHARACTERS_PER_KEYWORD = 1;
|
||||
exports.MIN_REGEX_PATTERN_LENGTH = 1;
|
||||
exports.MAX_REGEX_PATTERN_LENGTH = 260;
|
||||
exports.MAX_RULE_NAME_LENGTH = 100;
|
||||
exports.MIN_MENTION_SPAM_LIMIT = 1;
|
||||
exports.MAX_MENTION_SPAM_LIMIT = 50;
|
||||
exports.MENTION_SPAM_LIMIT_DEFAULT = 20;
|
||||
exports.MAX_BLOCK_ACTION_CUSTOM_MESSAGE_LENGTH = 300;
|
||||
exports.SUBMIT_FEEDBACK_MODAL_KEY = 'automod-submit-feedback';
|
||||
exports.QUARANTINE_USER_ALERT_KEY = 'automod-profile-quarantine-alert';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/* Metro module 11460; source: modules/guild_automod/DataUtils.tsx; dependencies: [22, 2] */
|
||||
function _fun87751(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11646:6, offset: 0x01fc9c7e, size: 117 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/DataUtils.tsx');
|
||||
exports._transformMetadataToCamelCase = function(a0) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
var env0_0 = value;
|
||||
if (value == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = global.Object.keys(value);
|
||||
value = value.reduce(_fun87753, {});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports._transformMetadataToSnakeCase = function(a0) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
var env0_0 = value;
|
||||
if (value == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = global.Object.keys(value);
|
||||
value = value.reduce(_fun87755, {});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
}
|
||||
|
||||
function _transformMetadataToCamelCase(a0) { // fn#87752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11646:193, offset: 0x01fc9cf3, size: 59 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (value == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = global.Object.keys(value);
|
||||
value = value.reduce(_fun87753, {});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _transformMetadataToSnakeCase(a0) { // fn#87754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11646:451, offset: 0x01fc9daf, size: 59 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (value == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = global.Object.keys(value);
|
||||
value = value.reduce(_fun87755, {});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun87753(a0, a1) { // fn#87753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11646:275, offset: 0x01fc9d2e, size: 129 bytes, params: 3, frame: 17
|
||||
var Array;
|
||||
const value2 = (require(22) /* metro dependency 22 */).camelCase(a1);
|
||||
if (typeof env0_0[a1] !== 'object') {
|
||||
a0[value2] = env0_0[a1];
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(env0_0[a1])) {
|
||||
a0[value2] = env0_0[a1];
|
||||
} else {
|
||||
a0[value2] = _transformMetadataToCamelCase(env0_0[a1]);
|
||||
}
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun87755(a0, a1) { // fn#87755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11646:533, offset: 0x01fc9dea, size: 141 bytes, params: 3, frame: 17
|
||||
var Array;
|
||||
const value2 = (require(22) /* metro dependency 22 */).snakeCase(a1);
|
||||
if (typeof env0_0[a1] !== 'object') {
|
||||
a0[value2] = env0_0[a1];
|
||||
} else {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(env0_0[a1])) {
|
||||
a0[value2] = env0_0[a1];
|
||||
} else {
|
||||
a0[value2] = _transformMetadataToSnakeCase(env0_0[a1]);
|
||||
}
|
||||
}
|
||||
a0[value2] = env0_0[a1];
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 10925; source: modules/guild_automod/ExperimentUtils.tsx; dependencies: [10926, 2] */
|
||||
function _fun83732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11111:6, offset: 0x01f2638f, size: 109 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/ExperimentUtils.tsx');
|
||||
exports.isInMentionRaidExperiment = function(a0) {
|
||||
var AutomodMentionRaidLimit = require(dependencyMap[0]).AutomodMentionRaidLimit;
|
||||
return AutomodMentionRaidLimit.getCurrentConfig({guildId: a0, location: '988d4e_3'}).enabled;
|
||||
};
|
||||
exports.useIsMentionRaidExperimentEnabled = useIsMentionRaidExperimentEnabled;
|
||||
}
|
||||
|
||||
function useIsMentionRaidExperimentEnabled(a0) { // fn#83734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11111:367, offset: 0x01f2643f, size: 84 bytes, params: 2, frame: 14
|
||||
const value = a1;
|
||||
const r4 = !(value !== undefined) || value;
|
||||
const AutomodMentionRaidLimit = (require(10926) /* metro dependency 10926: AutomodExperiment */).AutomodMentionRaidLimit;
|
||||
const useExperiment = AutomodMentionRaidLimit.useExperiment;
|
||||
return Reflect.apply(useExperiment, AutomodMentionRaidLimit, [{guildId: a0, location: '988d4e_4'},
|
||||
{autoTrackExposure: r4}]).enabled;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Metro module 11453; source: modules/guild_automod/GuildAutomodActionActionCreators.native.tsx; dependencies: [31, 11454, 33, 5080, 11458, 1962, 4496, 11461, 2] */
|
||||
function _fun87691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:6, offset: 0x01fc8236, size: 226 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const constantsModule = require(11454) /* metro dependency 11454: Constants */;
|
||||
const env0_3 = constantsModule.AutomodActionType;
|
||||
const env0_4 = constantsModule.SUBMIT_FEEDBACK_MODAL_KEY;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/GuildAutomodActionActionCreators.native.tsx');
|
||||
exports.getPromiseableActionHandlers = function() {
|
||||
return {[AutomodActionType.BLOCK_MESSAGE]: null, [AutomodActionType.FLAG_TO_CHANNEL]: null,
|
||||
[AutomodActionType.USER_COMMUNICATION_DISABLED]: null};
|
||||
};
|
||||
exports.openSubmitFeedback = openSubmitFeedback;
|
||||
exports.openRaidResolveModal = function() {
|
||||
};
|
||||
exports.openConfirmRemoveMentionRaid = function() {
|
||||
};
|
||||
exports.openAutomodProfileQuarantineAlert = openAutomodProfileQuarantineAlert;
|
||||
}
|
||||
|
||||
function openSubmitFeedback(a0, a1, a2, a3) { // fn#87693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:465, offset: 0x01fc8346, size: 131 bytes, params: 5, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[3]);
|
||||
defaultImport.pushLazy(require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths), {onCloseModal: function() {
|
||||
importDefault(dependencyMap[3]).popWithKey(SUBMIT_FEEDBACK_MODAL_KEY);
|
||||
}, automodDecision: {messageId: a0, messageContent: a1, decisionId: a2, channel: a3}}, SUBMIT_FEEDBACK_MODAL_KEY);
|
||||
}
|
||||
|
||||
function openAutomodProfileQuarantineAlert(a0) { // fn#87697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:824, offset: 0x01fc83f3, size: 61 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
|
||||
value.openLazy({importer: importer_87698});
|
||||
}
|
||||
|
||||
function openAutomodProfileQuarantineAlertImporter() { // fn#87698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:897, owner: openAutomodProfileQuarantineAlert.importer, offset: 0x01fc8430, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(dependencyMap[5]);
|
||||
value = value(dependencyMap[7], dependencyMap.paths);
|
||||
return value.then(function({default: env0_0}) {
|
||||
return _fun87700;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun87699({default: env0_0}) { // fn#87699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:929, offset: 0x01fc8470, size: 23 bytes, params: 2, frame: 2
|
||||
return _fun87700;
|
||||
}
|
||||
|
||||
function _fun87700(a0) { // fn#87700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11639:944, offset: 0x01fc8487, size: 52 bytes, params: 2, frame: 14
|
||||
return ((Component) => <Component {...a0} {...{['guildId']: env2_0}} />)(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
/* Metro module 11459; source: modules/guild_automod/GuildAutomodActionCreators.tsx; dependencies: [5, 1867, 3784, 661, 11460, 1360, 21, 507, 11453, 4863, 5061, 694, 2] */
|
||||
function _fun87719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:6, offset: 0x01fc91dc, size: 405 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.AnalyticEvents;
|
||||
const env0_7 = constantsModule.Endpoints;
|
||||
const env0_8 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/GuildAutomodActionCreators.tsx');
|
||||
exports.validateAutomodRule = function() {
|
||||
return _validateAutomodRule.apply(this, arguments);
|
||||
};
|
||||
exports.createAutomodRule = function() {
|
||||
return _createAutomodRule.apply(this, arguments);
|
||||
};
|
||||
exports.updateAutomodRule = function() {
|
||||
return _updateAutomodRule.apply(this, arguments);
|
||||
};
|
||||
exports.deleteAutomodRule = function() {
|
||||
return _deleteAutomodRule.apply(this, arguments);
|
||||
};
|
||||
exports.fetchAutomodRules = function() {
|
||||
return _fetchAutomodRules.apply(this, arguments);
|
||||
};
|
||||
exports.executeAlertAction = function() {
|
||||
return _executeAlertAction.apply(this, arguments);
|
||||
};
|
||||
exports.removeMentionRaidRestrictionWithFeedback = removeMentionRaidRestrictionWithFeedback;
|
||||
exports.clearMentionRaidDetected = clearMentionRaidDetected;
|
||||
}
|
||||
|
||||
function _transformClientActionToApiAction({type, metadata}) { // fn#87720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:185, offset: 0x01fc9371, size: 63 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.type = type;
|
||||
object2.metadata = (require(11460) /* metro dependency 11460: DataUtils */)._transformMetadataToSnakeCase(metadata);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _transformClientRuleToApiRule({triggerMetadata, id, name, guildId, eventType, triggerType, actions, enabled, creatorId, position, exemptChannels, exemptRoles}) { // fn#87721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:310, offset: 0x01fc93b0, size: 276 bytes, params: 2, frame: 18
|
||||
const value2 = (require(11460) /* metro dependency 11460: DataUtils */)._transformMetadataToSnakeCase(triggerMetadata);
|
||||
if (value2 != null) {
|
||||
delete value2.keywordLists;
|
||||
}
|
||||
const object2 = {};
|
||||
object2.id = id;
|
||||
object2.name = name;
|
||||
object2.guild_id = guildId;
|
||||
object2.event_type = eventType;
|
||||
object2.trigger_type = triggerType;
|
||||
object2.trigger_metadata = value2;
|
||||
const value3 = actions.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
object2.actions = value3.map(_transformClientActionToApiAction);
|
||||
object2.enabled = enabled;
|
||||
object2.creator_id = creatorId;
|
||||
object2.position = position;
|
||||
let Array = global.Array;
|
||||
object2.exempt_channels = Array.from(exemptChannels ?? []);
|
||||
Array = global.Array;
|
||||
object2.exempt_roles = Array.from(exemptRoles ?? []);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _transformApiActionToClientAction({type, metadata}) { // fn#87722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:828, offset: 0x01fc94c4, size: 63 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.type = type;
|
||||
object2.metadata = (require(11460) /* metro dependency 11460: DataUtils */)._transformMetadataToCamelCase(metadata);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _transformApiRuletoClientRule({id, name, guild_id, event_type, trigger_type, trigger_metadata, actions, enabled, creator_id, position, exempt_channels, exempt_roles}) { // fn#87723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:953, offset: 0x01fc9503, size: 363 bytes, params: 2, frame: 18
|
||||
var r3;
|
||||
var value;
|
||||
var fromTimestamp;
|
||||
var Date;
|
||||
const object2 = {};
|
||||
if (id != null) {
|
||||
r3 = id;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
fromTimestamp = value.fromTimestamp;
|
||||
Date = global.Date;
|
||||
value = Reflect.apply(fromTimestamp, value, [Date.now()]);
|
||||
r3 = value;
|
||||
}
|
||||
object2.id = r3;
|
||||
object2.name = name;
|
||||
object2.guildId = guild_id;
|
||||
object2.eventType = event_type;
|
||||
object2.triggerType = trigger_type;
|
||||
object2.triggerMetadata = (require(11460) /* metro dependency 11460: DataUtils */)._transformMetadataToCamelCase(trigger_metadata);
|
||||
const value2 = actions.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
object2.actions = value2.map(_transformApiActionToClientAction);
|
||||
object2.enabled = enabled;
|
||||
object2.creatorId = creator_id;
|
||||
object2.position = position;
|
||||
let Set = global.Set;
|
||||
object2.exemptChannels = new Set(exempt_channels ?? []);
|
||||
Set = global.Set;
|
||||
object2.exemptRoles = new Set(exempt_roles ?? []);
|
||||
if (object2.triggerMetadata != null) {
|
||||
delete object2.triggerMetadata.keywordLists;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _validateAutomodRule() { // fn#87724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:1545, offset: 0x01fc966e, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87726).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _createAutomodRule() { // fn#87727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:1839, offset: 0x01fc9745, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87729).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _updateAutomodRule() { // fn#87730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2123, offset: 0x01fc9808, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87732).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _deleteAutomodRule() { // fn#87733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2400, offset: 0x01fc98cf, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87735).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fetchAutomodRules() { // fn#87736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2585, offset: 0x01fc9973, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87738).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _executeAlertAction() { // fn#87739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2837, offset: 0x01fc9a46, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun87741).apply(this, arguments);
|
||||
}
|
||||
|
||||
function removeMentionRaidRestrictionWithFeedback(a0, a1, a2) { // fn#87748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:3845, offset: 0x01fc9b2c, size: 123 bytes, params: 4, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
if (guild != null && PermissionStore.can(Permissions.MANAGE_GUILD, guild)) {
|
||||
(require(11453) /* metro dependency 11453: GuildAutomodActionActionCreatorsNative */).openConfirmRemoveMentionRaid(_fun87749);
|
||||
}
|
||||
}
|
||||
|
||||
function clearMentionRaidDetected(a0) { // fn#87750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:4248, offset: 0x01fc9c46, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AUTO_MODERATION_MENTION_RAID_NOTICE_DISMISS',
|
||||
guildId: a0});
|
||||
}
|
||||
|
||||
function* _fun87726(a0) { // fn#87726, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:1608, offset: 0x01fc96ab, size: 154 bytes, params: 2, frame: 18
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_10(a0);
|
||||
let binding = env2_0;
|
||||
const HTTP = binding(env2_2[7]).HTTP;
|
||||
const post = HTTP.post;
|
||||
binding = env2_7;
|
||||
const GUILD_AUTOMOD_VALIDATE_RULE = binding.GUILD_AUTOMOD_VALIDATE_RULE;
|
||||
yield Reflect.apply(post, HTTP, [{url: Reflect.apply(GUILD_AUTOMOD_VALIDATE_RULE, binding, [a0.guildId]),
|
||||
body: value3, rejectWithError: false}]);
|
||||
const value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
value = env2_0(env2_2[4]);
|
||||
return value._transformMetadataToCamelCase(value4.body);
|
||||
}
|
||||
|
||||
function* _fun87729(a0) { // fn#87729, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:1898, offset: 0x01fc9782, size: 134 bytes, params: 2, frame: 18
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_10(a0);
|
||||
delete value3.id;
|
||||
const binding = env2_12;
|
||||
const HTTP = env2_0(env2_2[7]).HTTP;
|
||||
const post = HTTP.post;
|
||||
const binding3 = env2_7;
|
||||
const GUILD_AUTOMOD_RULES = binding3.GUILD_AUTOMOD_RULES;
|
||||
yield Reflect.apply(post, HTTP, [{url: Reflect.apply(GUILD_AUTOMOD_RULES, binding3, [a0.guildId]), body: value3,
|
||||
rejectWithError: false}]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return binding(value.body);
|
||||
}
|
||||
|
||||
function* _fun87732(a0) { // fn#87732, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2182, offset: 0x01fc9845, size: 138 bytes, params: 2, frame: 20
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_10(a0);
|
||||
const binding = env2_12;
|
||||
const HTTP = env2_0(env2_2[7]).HTTP;
|
||||
const patch = HTTP.patch;
|
||||
const binding3 = env2_7;
|
||||
const GUILD_AUTOMOD_RULE = binding3.GUILD_AUTOMOD_RULE;
|
||||
yield Reflect.apply(patch, HTTP, [{url: Reflect.apply(GUILD_AUTOMOD_RULE, binding3, [a0.guildId, a0.id]),
|
||||
body: value3, rejectWithError: false}]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return binding(value.body);
|
||||
}
|
||||
|
||||
function* _fun87735(a0, a1) { // fn#87735, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2459, offset: 0x01fc990c, size: 103 bytes, params: 3, frame: 17
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const HTTP = env2_0(env2_2[7]).HTTP;
|
||||
const del = HTTP.del;
|
||||
const object2 = {};
|
||||
object2.url = env2_7.GUILD_AUTOMOD_RULE(a1, a0);
|
||||
object2.rejectWithError = false;
|
||||
yield Reflect.apply(del, HTTP, [object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function* _fun87738(a0) { // fn#87738, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2644, offset: 0x01fc99b0, size: 150 bytes, params: 2, frame: 16
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const HTTP = env2_0(env2_2[7]).HTTP;
|
||||
const get = HTTP.get;
|
||||
const object2 = {};
|
||||
object2.url = env2_7.GUILD_AUTOMOD_RULES(a0);
|
||||
object2.rejectWithError = false;
|
||||
yield Reflect.apply(get, HTTP, [object2]);
|
||||
const value3 = undefined;
|
||||
if (false) {
|
||||
return value3;
|
||||
}
|
||||
const Array = global.Array;
|
||||
return Array.isArray(value3.body) ? value3.body.map(env2_12) : [];
|
||||
}
|
||||
|
||||
function* _fun87741(a0, a1, a2) { // fn#87741, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:2898, offset: 0x01fc9a83, size: 169 bytes, params: 4, frame: 17
|
||||
var HTTP;
|
||||
var post;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_5;
|
||||
var can = binding.can;
|
||||
var MANAGE_MESSAGES = env2_8.MANAGE_MESSAGES;
|
||||
if (Reflect.apply(can, binding, [MANAGE_MESSAGES, a1])) {
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[7]).HTTP;
|
||||
post = HTTP.post;
|
||||
binding = env2_7;
|
||||
yield Reflect.apply(post, HTTP, [{url: binding.GUILD_AUTOMOD_ALERT_ACTION(a1.guild_id),
|
||||
body: {message_id: a0,
|
||||
channel_id: a1.id, alert_action_type: a2}, rejectWithError: false}]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87749() { // fn#87749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11645:3994, offset: 0x01fc9ba7, size: 159 bytes, params: 1, frame: 19
|
||||
var object2;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const GUILD_AUTOMOD_FEEDBACK = AnalyticEvents.GUILD_AUTOMOD_FEEDBACK;
|
||||
const Feedback = (require(5061) /* metro dependency 5061: AutomodFeedback */).Feedback;
|
||||
const MENTION_RAID_REMOVE_RESTRICTION = Feedback.MENTION_RAID_REMOVE_RESTRICTION;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [GUILD_AUTOMOD_FEEDBACK,
|
||||
{feedback_type: MENTION_RAID_REMOVE_RESTRICTION, decision_id: require}]);
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const post = HTTP.post;
|
||||
object2 = {};
|
||||
object2.url = Endpoints.GUILD_AUTOMOD_CLEAR_MENTION_RAID(env0_0);
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
importDefault();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 9899; source: modules/guild_automod/GuildAutomodMessageActionCreators.tsx; dependencies: [694, 2] */
|
||||
function _fun77582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10085:6, offset: 0x01e01f7e, size: 99 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/GuildAutomodMessageActionCreators.tsx');
|
||||
exports.removeAutomodMessageNotice = removeAutomodMessageNotice;
|
||||
}
|
||||
|
||||
function removeAutomodMessageNotice(a0) { // fn#77583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10085:214, offset: 0x01e01fe1, size: 55 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'REMOVE_AUTOMOD_MESSAGE_NOTICE',
|
||||
messageId: a0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/* Metro module 8183; source: modules/guild_automod/GuildAutomodMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 4814, 661, 4862, 7246, 4625, 5051, 21, 566, 694, 2] */
|
||||
function _fun65626(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:6, offset: 0x01bd5b73, size: 494 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = MESSAGE_SEND_FAILED_AUTOMOD;
|
||||
const closure2 = LOAD_MESSAGES_SUCCESS_65631;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.AbortCodes;
|
||||
const env0_11 = value.MessageEmbedTypes;
|
||||
const env0_12 = value.MessageTypes;
|
||||
const env0_13 = {};
|
||||
const env0_15 = {};
|
||||
const env0_16 = {};
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
value = _fun65635(PersistedStore);
|
||||
value.displayName = 'GuildAutomodMessageStore';
|
||||
value.persistKey = 'GuildAutomodMessages';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{CONNECTION_OPEN: CONNECTION_OPEN_65643, LOAD_MESSAGES_SUCCESS: closure2, LOCAL_MESSAGES_LOADED: closure2,
|
||||
MESSAGE_CREATE: MESSAGE_CREATE_65644, MESSAGE_SEND_FAILED_AUTOMOD: closure,
|
||||
MESSAGE_EDIT_FAILED_AUTOMOD: closure, REMOVE_AUTOMOD_MESSAGE_NOTICE: function({messageId}) {
|
||||
removeFailedMessage(messageId);
|
||||
return true;
|
||||
}, MESSAGE_END_EDIT: function({response}) {
|
||||
var value = undefined;
|
||||
if ((response == null ? value : response.body) == null) {
|
||||
return false;
|
||||
}
|
||||
if (response.body.code === AbortCodes.AUTOMOD_MESSAGE_BLOCKED) {
|
||||
return false;
|
||||
}
|
||||
response = response.body.id;
|
||||
if (response == null) {
|
||||
return false;
|
||||
}
|
||||
removeFailedMessage(response);
|
||||
return value;
|
||||
}, AUTO_MODERATION_MENTION_RAID_DETECTION: AUTO_MODERATION_MENTION_RAID_DETECTION,
|
||||
AUTO_MODERATION_MENTION_RAID_NOTICE_DISMISS: AUTO_MODERATION_MENTION_RAID_NOTICE_DISMISS});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/GuildAutomodMessageStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_65627() { // fn#65627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:232, offset: 0x01bd5d61, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_65627_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function MESSAGE_EDIT_FAILED_AUTOMOD_65630({messageData, errorResponseBody}) { // fn#65630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:501, offset: 0x01bd5dc3, size: 139 bytes, params: 2, frame: 19
|
||||
const failedMessageId = (require(4862) /* metro dependency 4862: MessageQueue */).getFailedMessageId(messageData);
|
||||
const object2 = {id: failedMessageId};
|
||||
object2.isBlockedEdit = (require(4862) /* metro dependency 4862: MessageQueue */).isMessageDataEdit(messageData);
|
||||
object2.messageData = messageData;
|
||||
object2.errorMessage = (require(7246) /* metro dependency 7246: AutomodErrorUtils */).getAutomodErrorMessage(messageData,
|
||||
errorResponseBody);
|
||||
env0_13[failedMessageId] = object2;
|
||||
const binding = env0_14;
|
||||
env0_14 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
function LOAD_MESSAGES_SUCCESS_65631({channelId, messages}) { // fn#65631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:765, offset: 0x01bd5e4e, size: 123 bytes, params: 2, frame: 16
|
||||
const guildId = ChannelStore.getChannel(channelId)?.getGuildId();
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const value5 = messages.reduce(_fun65632, env0_16[guildId]);
|
||||
let r0 = value5 != null && env0_16[guildId] !== value5;
|
||||
if (r0) {
|
||||
env0_16[guildId] = value5;
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function removeFailedMessage(a0) { // fn#65634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:468, offset: 0x01bd5f6f, size: 43 bytes, params: 2, frame: 4
|
||||
if (env0_13[a0] != null) {
|
||||
delete env0_13[a0];
|
||||
}
|
||||
const binding = env0_14;
|
||||
env0_14 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function _fun65635(a0) { // fn#65635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:1161, offset: 0x01bd5f9a, size: 203 bytes, params: 2, frame: 16
|
||||
const closure = GuildAutomodMessageStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function(a0) {
|
||||
this.waitFor(ChannelStore, MessageStore);
|
||||
if (a0 != null) {
|
||||
env1_13 = a0.automodFailedMessages;
|
||||
env1_15 = a0.mentionRaidDetectionByGuild;
|
||||
}
|
||||
}}, {key: 'getState', value: value_65638}, {key: 'getMessage', value: value_65639}, {key: 'getMessagesVersion',
|
||||
value: value_65640}, {key: 'getMentionRaidDetected', value: value_65641}, {key: 'getLastIncidentAlertMessage',
|
||||
value: value_65642}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_65643() { // fn#65643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:2194, offset: 0x01bd60fc, size: 60 bytes, params: 1, frame: 12
|
||||
const Object = global.Object;
|
||||
return Object.keys(env0_13).length !== 0 && true;
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_65644({guildId, message}) { // fn#65644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:2372, offset: 0x01bd6138, size: 177 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
var r0;
|
||||
var isAutomodNotification2;
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const type = message.type;
|
||||
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
|
||||
if (type !== AUTO_MODERATION_ACTION) {
|
||||
return false;
|
||||
}
|
||||
const messageRecord = (require(4625) /* metro dependency 4625: MessageRecordUtils */).createMessageRecord(message);
|
||||
const isAutomodMessageRecord2 = (require(5051) /* metro dependency 5051: AutomodMessageUtils */).isAutomodMessageRecord(messageRecord);
|
||||
if (isAutomodMessageRecord2) {
|
||||
isAutomodNotification2 = (require(5051) /* metro dependency 5051: AutomodMessageUtils */).isAutomodNotification(messageRecord);
|
||||
if (isAutomodNotification2) {
|
||||
env0_16[guildId] = messageRecord.id;
|
||||
r1 = true;
|
||||
} else {
|
||||
r1 = !!isAutomodNotification2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = !!isAutomodMessageRecord2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function AUTO_MODERATION_MENTION_RAID_DETECTION({guildId, decisionId, suspiciousMentionActivityUntil}) { // fn#65647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:3126, offset: 0x01bd6262, size: 51 bytes, params: 2, frame: 6
|
||||
env0_15[guildId] = {guildId: guildId, decisionId: decisionId,
|
||||
suspiciousMentionActivityUntil: suspiciousMentionActivityUntil};
|
||||
return true;
|
||||
}
|
||||
|
||||
function AUTO_MODERATION_MENTION_RAID_NOTICE_DISMISS({guildId}) { // fn#65648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:3339, offset: 0x01bd6295, size: 23 bytes, params: 2, frame: 2
|
||||
delete env0_15[guildId];
|
||||
return true;
|
||||
}
|
||||
|
||||
function _fun65632(a0, a1) { // fn#65632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:918, offset: 0x01bd5ec9, size: 139 bytes, params: 3, frame: 19
|
||||
var id;
|
||||
var r0;
|
||||
var embeds;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var compare;
|
||||
let value = a0;
|
||||
const type = a1.type;
|
||||
const AUTO_MODERATION_ACTION = MessageTypes.AUTO_MODERATION_ACTION;
|
||||
if (type !== AUTO_MODERATION_ACTION) {
|
||||
r0 = value;
|
||||
} else {
|
||||
embeds = a1.embeds;
|
||||
value3 = undefined;
|
||||
if (embeds == null ? value3 : embeds.some(function({type}) {
|
||||
return type === MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
})) {
|
||||
if (value == null) {
|
||||
id = a1.id;
|
||||
} else {
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
compare = defaultImport.compare;
|
||||
id = a1.id;
|
||||
value = Reflect.apply(compare, defaultImport, [value, id]);
|
||||
id = value !== -1 ? value3 : a1.id;
|
||||
}
|
||||
r0 = id;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_65638() { // fn#65638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:1634, offset: 0x01bd60a0, size: 36 bytes, params: 1, frame: 3
|
||||
return {automodFailedMessages: env1_13, mentionRaidDetectionByGuild: env1_15, lastIncidentAlertMessage: env1_16};
|
||||
}
|
||||
|
||||
function value_65641(a0) { // fn#65641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:1912, offset: 0x01bd60c4, size: 28 bytes, params: 2, frame: 3
|
||||
let value = environment.__proto__;
|
||||
const property = env1_15[a0];
|
||||
value = null;
|
||||
return value != property ? property : value;
|
||||
}
|
||||
|
||||
function value_65642(a0) { // fn#65642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8368:2002, offset: 0x01bd60e0, size: 28 bytes, params: 2, frame: 3
|
||||
let value = environment.__proto__;
|
||||
const property = env1_16[a0];
|
||||
value = null;
|
||||
return value != property ? property : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 5259; source: modules/guild_automod/GuildAutomodMessageStoreUtils.tsx; dependencies: [678, 2] */
|
||||
function _fun46778(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5437:6, offset: 0x011ae9a2, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/GuildAutomodMessageStoreUtils.tsx');
|
||||
exports.isNotAutomodEmbed = isNotAutomodEmbed;
|
||||
}
|
||||
|
||||
function isNotAutomodEmbed({type}) { // fn#46779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5437:201, offset: 0x011aea00, size: 86 bytes, params: 2, frame: 14
|
||||
const MessageEmbedTypes = (require(678) /* metro dependency 678: MessageEmbedTypes */).MessageEmbedTypes;
|
||||
const AUTO_MODERATION_MESSAGE = MessageEmbedTypes.AUTO_MODERATION_MESSAGE;
|
||||
return type !== AUTO_MODERATION_MESSAGE && type !== MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 15195; source: modules/guild_automod/PermissionUtils.tsx; dependencies: [1867, 3784, 661, 566, 2] */
|
||||
function _fun116195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:6, offset: 0x0247f2eb, size: 216 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.GuildFeatures;
|
||||
const env0_5 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/PermissionUtils.tsx');
|
||||
exports.canCurrentUserManageMessageFilters = canCurrentUserManageMessageFilters;
|
||||
exports.canCurrentUserManageAutomod = function(a0) {
|
||||
return getHasAutomodAccess(a0);
|
||||
};
|
||||
exports.useCanCurrentUserManageAutomod = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[3]).useStateFromStores([GuildStore, PermissionStore], _fun116200, [a0]);
|
||||
};
|
||||
exports.useIsUserProfileRuleEnabled = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[3]).useStateFromStores([GuildStore], _fun116202, [a0]);
|
||||
};
|
||||
}
|
||||
|
||||
function getHasAutomodAccess(a0) { // fn#116196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:180, offset: 0x0247f3c3, size: 80 bytes, params: 2, frame: 14
|
||||
let value = a1;
|
||||
const value2 = a2;
|
||||
const r2 = value !== undefined ? value : GuildStore;
|
||||
const r4 = value2 !== undefined ? value2 : PermissionStore;
|
||||
value = r2.getGuild(a0);
|
||||
return value != null && r4.can(Permissions.MANAGE_GUILD, value);
|
||||
}
|
||||
|
||||
function canCurrentUserManageMessageFilters(a0) { // fn#116197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:367, offset: 0x0247f413, size: 28 bytes, params: 2, frame: 12
|
||||
return a0 != null && getHasAutomodAccess(a0);
|
||||
}
|
||||
|
||||
function useCanCurrentUserManageAutomod(a0) { // fn#116199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:588, offset: 0x0247f42f, size: 83 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore], _fun116200,
|
||||
[a0]);
|
||||
}
|
||||
|
||||
function useIsUserProfileRuleEnabled(a0) { // fn#116201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:740, offset: 0x0247f4a3, size: 75 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun116202, [a0]);
|
||||
}
|
||||
|
||||
function _fun116200() { // fn#116200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:672, offset: 0x0247f482, size: 33 bytes, params: 1, frame: 15
|
||||
return getHasAutomodAccess(env0_0, GuildStore, PermissionStore);
|
||||
}
|
||||
|
||||
function _fun116202() { // fn#116202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15392:819, offset: 0x0247f4ee, size: 69 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
let r0 = guild == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
|
||||
r0 = !!r0 && r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 15884; source: modules/guild_automod/SystemRulesUtils.tsx; dependencies: [2] */
|
||||
function _fun122564(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16092:6, offset: 0x0256c100, size: 127 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Set = global.Set;
|
||||
const set = new Set(['1030554520465440818']);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/SystemRulesUtils.tsx');
|
||||
exports.isDefaultRuleId = isDefaultRuleId;
|
||||
}
|
||||
|
||||
function isDefaultRuleId(a0) { // fn#122565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16092:225, offset: 0x0256c17f, size: 31 bytes, params: 2, frame: 12
|
||||
return a0 != null && env0_0.has(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/* Metro module 11458; source: modules/guild_automod/native/AutomodSubmitFeedbackModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 6618, 5277, 1244, 8160, 5061, 1585, 4573, 1305, 7972, 4578, 4863, 11459, 5060, 3856, 5280, 2] */
|
||||
function _fun87705(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:6, offset: 0x01fc8897, size: 575 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.AnalyticEvents;
|
||||
const Fonts = value.Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {'flex': 1, 'paddingHorizontal': 16, 'paddingVertical': 0, 'backgroundColor': null,
|
||||
'flexDirection': 'column', 'height': '100%', 'paddingTop': 8, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.header = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'paddingVertical': 8,
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object3 = {'fontSize': 24, 'fontFamily': null, 'textAlign': 'center', 'color': null, 'lineHeight': 30};
|
||||
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
|
||||
object3.fontFamily = PRIMARY_BOLD;
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object3.color = MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.headerTitle = object3;
|
||||
object2.headerSubtitle = {'textAlign': 'center', 'marginTop': 8};
|
||||
object2.closeButtonContainer = {marginVertical: 14};
|
||||
const object5 = {marginTop: 24};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object2.formBody = object5;
|
||||
object2.formRow = {paddingVertical: 2};
|
||||
object2.radioIndicator = {marginRight: 0};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.submitButtonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0,
|
||||
'paddingHorizontal': 16, 'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/native/AutomodSubmitFeedbackModal.tsx');
|
||||
exports.default = AutomodSubmitFeedbackModal;
|
||||
}
|
||||
|
||||
function Navbar({onClose}) { // fn#87706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1076, offset: 0x01fc8ad6, size: 216 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<SafeAreaPaddingView top style={styles.header}>
|
||||
<View style={styles.closeButtonContainer}>
|
||||
<HeaderActionButton
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
onPress={onClose}
|
||||
source={importDefault(8160) /* metro dependency 8160 */}
|
||||
/>
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function SubmitFeedbackScreen({feedback, onChange, onSubmit}) { // fn#87707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1346, offset: 0x01fc8bae, size: 556 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const value2 = (require(5061) /* metro dependency 5061: AutomodFeedback */).generateFeedbackOptions();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const items3 = [<LegacyText style={styles.headerTitle}>{Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t['7bdzNo']])}</LegacyText>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const Lbpk6m = (require(1244) /* metro dependency 1244: indexNative */).t.Lbpk6m;
|
||||
items3[1] = <Text style={styles.headerSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
|
||||
intl, [Lbpk6m])}</Text>;
|
||||
items3[2] = <View style={styles.formBody}>{value2.map(_fun87709)}</View>;
|
||||
const items2 = [styles.submitButtonContainer];
|
||||
items2[1] = {paddingBottom: bottom + 16};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const Z6DZZ6 = (require(1244) /* metro dependency 1244: indexNative */).t.Z6DZZ6;
|
||||
items3[3] = <View style={items2}><Button size="md" text={Reflect.apply(string, intl,
|
||||
[Z6DZZ6])} onPress={onSubmit} /></View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function AutomodSubmitFeedbackModal({onCloseModal, automodDecision}) { // fn#87711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2385, offset: 0x01fc8f29, size: 224 bytes, params: 2, frame: 21
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const Feedback = (require(5061) /* metro dependency 5061: AutomodFeedback */).Feedback;
|
||||
const BUG = Feedback.BUG;
|
||||
const value3 = env0_3(Reflect.apply(useState, binding, [BUG]), 2);
|
||||
const property = value3[0];
|
||||
var env0_3 = value3[1];
|
||||
const value4 = env0_4.useMemo(_fun87712, [property, onCloseModal, automodDecision]);
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
return (
|
||||
<Navigator
|
||||
screens={value4}
|
||||
initialRouteName="SUBMIT_FEEDBACK"
|
||||
headerStatusBarHeight={top}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function SubmitFeedbackScreenLabel(a0) { // fn#87708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1485, owner: SubmitFeedbackScreen.label, offset: 0x01fc8dda, size: 82 bytes, params: 2, frame: 14
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
style={styles.formRow}
|
||||
variant="text-md/semibold"
|
||||
color="interactive-text-active"
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87709({name, value}, a1) { // fn#87709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:1901, offset: 0x01fc8e2c, size: 253 bytes, params: 3, frame: 26
|
||||
const Fragment = env1_4.Fragment;
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
const RadioIndicator = (require(1305) /* metro dependency 1305: native */).RadioIndicator;
|
||||
return (
|
||||
<Fragment key={value}>
|
||||
<FormRow
|
||||
onPress={function() {
|
||||
return onChange(value);
|
||||
}}
|
||||
trailing={<RadioIndicator active={feedback === value} style={styles.radioIndicator} />}
|
||||
label={SubmitFeedbackScreenLabel(name)}
|
||||
/>
|
||||
{a1 < env0_3.length - 1 && ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87712() { // fn#87712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2550, offset: 0x01fc9009, size: 65 bytes, params: 1, frame: 12
|
||||
return (({onCloseModal, feedback, onChange, onSubmit}) => ({['SUBMIT_FEEDBACK']: {'ignoreKeyboard': true,
|
||||
'title': '', customNavbar: _fun87714, headerLeft: _fun87715, render: _fun87716}}))({onCloseModal: onCloseModal,
|
||||
feedback: env0_2, onChange: onChange_87717, onSubmit: onSubmit_87718});
|
||||
}
|
||||
|
||||
function getScreens_87713({onCloseModal, feedback, onChange, onSubmit}) { // fn#87713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2554, offset: 0x01fc904a, size: 108 bytes, params: 2, frame: 4
|
||||
return {['SUBMIT_FEEDBACK']: {'ignoreKeyboard': true, 'title': '', customNavbar: customNavbar_87714,
|
||||
headerLeft: function() {
|
||||
return null;
|
||||
}, render: render_87716}};
|
||||
}
|
||||
|
||||
function onSubmit_87718() { // fn#87718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2851, offset: 0x01fc9121, size: 187 bytes, params: 1, frame: 20
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const GUILD_AUTOMOD_FEEDBACK = AnalyticEvents.GUILD_AUTOMOD_FEEDBACK;
|
||||
const automodDecisionBinding = automodDecision;
|
||||
let messageId = automodDecisionBinding.messageId;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [GUILD_AUTOMOD_FEEDBACK, {feedback_type: env1_2,
|
||||
message_id: messageId, content: automodDecisionBinding.messageContent,
|
||||
decision_id: automodDecisionBinding.decisionId}]);
|
||||
const guildAutomodActionCreatorsModule = require(11459) /* metro dependency 11459: GuildAutomodActionCreators */;
|
||||
const executeAlertAction = guildAutomodActionCreatorsModule.executeAlertAction;
|
||||
messageId = automodDecisionBinding.messageId;
|
||||
const channel = automodDecisionBinding.channel;
|
||||
const AutomodAlertActionType = (require(5060) /* metro dependency 5060: AutomodAlert */).AutomodAlertActionType;
|
||||
const SUBMIT_FEEDBACK = AutomodAlertActionType.SUBMIT_FEEDBACK;
|
||||
Reflect.apply(executeAlertAction, guildAutomodActionCreatorsModule, [messageId, channel, SUBMIT_FEEDBACK]);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentFeedbackSent();
|
||||
onCloseModal();
|
||||
}
|
||||
|
||||
function getScreens_87713CustomNavbar() { // fn#87714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2677, owner: getScreens_87713.customNavbar, offset: 0x01fc90b6, size: 35 bytes, params: 1, frame: 13
|
||||
return <Navbar onClose={onCloseModal} />;
|
||||
}
|
||||
|
||||
function getScreens_87713Render() { // fn#87716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11644:2730, owner: getScreens_87713.render, offset: 0x01fc90d9, size: 53 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<SubmitFeedbackScreen
|
||||
feedback={feedback}
|
||||
onChange={onChange}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/* Metro module 11461; source: modules/guild_automod/native/AutomodUserProfileQuarantineAlert.tsx; dependencies: [57, 29, 31, 27, 1226, 1945, 1867, 11454, 661, 3772, 33, 4501, 697, 4596, 1244, 1305, 11462, 4573, 11463, 7007, 632, 3790, 4594, 683, 2] */
|
||||
function _fun87756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:6, offset: 0x01fc9e77, size: 539 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['title', 'description', 'buttonCta', 'onConfirm'];
|
||||
const env0_4 = ['guildId', 'guildName', 'automodReason'];
|
||||
const env0_5 = ['guildName'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_6 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_7 = importDefault(29) /* metro dependency 29 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_8 = (require(27) /* metro dependency 27 */).View;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_12 = (require(11454) /* metro dependency 11454: Constants */).QUARANTINE_USER_ALERT_KEY;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_13 = value.AnalyticEvents;
|
||||
const env0_14 = value.UserSettingsSections;
|
||||
const env0_15 = (require(3772) /* metro dependency 3772: GuildMemberConstants */).GuildMemberFlags;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value.jsx;
|
||||
const env0_17 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
||||
const env0_18 = Reflect.apply(createStyles, value, [{wrapper: {padding: 16}, body: {'flexDirection': 'column',
|
||||
'alignItems': 'center'}, mainIcon: {'width': 48, 'height': 48, 'tintColor': null, 'marginBottom': 16,
|
||||
tintColor: TEXT_FEEDBACK_CRITICAL}, title: {'marginBottom': 16, 'textAlign': 'center'},
|
||||
description: {textAlign: 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/native/AutomodUserProfileQuarantineAlert.tsx');
|
||||
exports.default = AutomodUserProfileQuarantineAlert;
|
||||
}
|
||||
|
||||
function ChatBlockedAlert(a0) { // fn#87757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:697, offset: 0x01fca092, size: 477 bytes, params: 2, frame: 28
|
||||
const title = a0.title;
|
||||
const description = a0.description;
|
||||
const buttonCta = a0.buttonCta;
|
||||
const onConfirm = a0.onConfirm;
|
||||
const binding = env0_7;
|
||||
const value2 = undefined;
|
||||
const value3 = binding(a0, env0_3);
|
||||
const styles = useStyles();
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const defaultImportProps = {...value3};
|
||||
defaultImportProps['style'] = styles.wrapper;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
defaultImportProps['cancelText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
defaultImportProps['onCancel'] = value3 == null ? value2 : value3.onClose;
|
||||
defaultImportProps['confirmText'] = buttonCta;
|
||||
defaultImportProps['onConfirm'] = onConfirm;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(11462) /* metro dependency 11462 */};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const CUSTOM = Sizes.CUSTOM;
|
||||
iconProps.size = CUSTOM;
|
||||
iconProps.style = styles.mainIcon;
|
||||
const items2 = [<Icon {...iconProps} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-md/medium" color="mobile-text-heading-primary">{title}</Text>;
|
||||
items2[2] = <Text style={styles.description} variant="text-sm/medium" color="text-default">{description}</Text>;
|
||||
return (
|
||||
<Alert {...defaultImportProps}>
|
||||
<View style={styles.body}>
|
||||
{items2}
|
||||
</View>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function PerServerProfileAlert(a0) { // fn#87758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:1310, offset: 0x01fca26f, size: 506 bytes, params: 2, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const guildId = a0.guildId;
|
||||
const guildName = a0.guildName;
|
||||
const automodReason = a0.automodReason;
|
||||
const value2 = env0_7(a0, env0_4);
|
||||
const AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME = GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME;
|
||||
let r7 = automodReason === AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SpDXI7) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TBeZmG);
|
||||
const automodQuarantineUtilsModule = require(11463) /* metro dependency 11463: AutomodQuarantineUtils */;
|
||||
const useOpenFixQuarantinedProfileModal = automodQuarantineUtilsModule.useOpenFixQuarantinedProfileModal;
|
||||
const value6 = env0_6(Reflect.apply(useOpenFixQuarantinedProfileModal, automodQuarantineUtilsModule,
|
||||
[{guildId: guildId}]), 2);
|
||||
const env0_0 = value6[0];
|
||||
const property = value6[1];
|
||||
r7 = !property ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FFj5Dt) : r7;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r6 = property ? Reflect.apply(string, intl, [t['/PGQf0']]) : Reflect.apply(string, intl, [t.WikgZ1]);
|
||||
const chatBlockedAlertBindingProps = {...value2};
|
||||
chatBlockedAlertBindingProps['title'] = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.kcYdTq,
|
||||
{guildName: guildName});
|
||||
chatBlockedAlertBindingProps['description'] = r7;
|
||||
chatBlockedAlertBindingProps['buttonCta'] = r6;
|
||||
chatBlockedAlertBindingProps['onConfirm'] = PerServerProfileAlertOnConfirm;
|
||||
return <ChatBlockedAlert {...chatBlockedAlertBindingProps} />;
|
||||
}
|
||||
|
||||
function ServerTagAlert(a0) { // fn#87760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:1895, offset: 0x01fca469, size: 255 bytes, params: 2, frame: 21
|
||||
const guildName = a0.guildName;
|
||||
const chatBlockedAlertBindingProps = {...env0_7(a0, env0_5)};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
chatBlockedAlertBindingProps['title'] = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.c8TwbL,
|
||||
{guildName: guildName});
|
||||
let string = intl.string;
|
||||
const EJJLHp = (require(1244) /* metro dependency 1244: indexNative */).t.EJJLHp;
|
||||
chatBlockedAlertBindingProps['description'] = Reflect.apply(string, intl, [EJJLHp]);
|
||||
string = intl.string;
|
||||
const Viksoo = (require(1244) /* metro dependency 1244: indexNative */).t.Viksoo;
|
||||
chatBlockedAlertBindingProps['buttonCta'] = Reflect.apply(string, intl, [Viksoo]);
|
||||
chatBlockedAlertBindingProps['onConfirm'] = function() {
|
||||
require(dependencyMap[19]).openUserSettings({screen: UserSettingsSections.PROFILE_CUSTOMIZATION});
|
||||
};
|
||||
return <ChatBlockedAlert {...chatBlockedAlertBindingProps} />;
|
||||
}
|
||||
|
||||
function AutomodUserProfileQuarantineAlert(a0) { // fn#87762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:2338, offset: 0x01fca59f, size: 390 bytes, params: 2, frame: 22
|
||||
const guildId = a0.guildId;
|
||||
const value2 = undefined;
|
||||
const id = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
|
||||
function() {
|
||||
return AuthenticationStore.getId();
|
||||
});
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
|
||||
function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
}, [guildId]);
|
||||
const r6 = (value3 == null ? value2 : value3.name) ?? '';
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildMemberStore],
|
||||
_fun87765, [guildId, id]);
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[23]);
|
||||
var OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
defaultImport.track(OPEN_MODAL, {type: QUARANTINE_USER_ALERT_KEY, guild_id: guildId, other_user_id: id});
|
||||
});
|
||||
const AUTOMOD_QUARANTINED_BIO = GuildMemberFlags.AUTOMOD_QUARANTINED_BIO;
|
||||
return value5 === AUTOMOD_QUARANTINED_BIO || value5 === GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME ? <PerServerProfileAlert automodReason={value5} guildName={r6} {...a0} /> : value5 === GuildMemberFlags.AUTOMOD_QUARANTINED_SERVER_TAG ? <ServerTagAlert guildName={r6} {...a0} /> : <PerServerProfileAlert automodReason={value5} guildName={r6} {...a0} />;
|
||||
}
|
||||
|
||||
function _fun87765() { // fn#87765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11647:2586, offset: 0x01fca725, size: 97 bytes, params: 1, frame: 20
|
||||
if (guildId == null) {
|
||||
return null;
|
||||
}
|
||||
const automodPermissionUtilsModule = require(3790) /* metro dependency 3790: AutomodPermissionUtils */;
|
||||
const getAutomodQuarantinedGuildMemberFlags = automodPermissionUtilsModule.getAutomodQuarantinedGuildMemberFlags;
|
||||
const getMember = GuildMemberStore.getMember;
|
||||
return automodPermissionUtilsModule.getAutomodReason(Reflect.apply(getAutomodQuarantinedGuildMemberFlags,
|
||||
automodPermissionUtilsModule, [Reflect.apply(getMember, GuildMemberStore, [guildId, id])]));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
/* Metro module 11450; source: modules/guild_automod/native/ModerateUserActionSheet.tsx; dependencies: [31, 1945, 1867, 3784, 1878, 661, 33, 4501, 566, 10289, 8037, 4617, 4080, 6807, 1244, 7002, 5080, 10296, 1962, 11449, 3773, 10317, 10299, 4054, 10321, 9409, 10323, 6275, 6758, 11451, 6231, 2] */
|
||||
function _fun87660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:6, offset: 0x01fc6bfc, size: 310 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value2.jsx;
|
||||
const env0_10 = value2.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'padding': 16,
|
||||
'gap': 16}, memberRoles: {justifyContent: 'flex-start'}});
|
||||
value = value.memo(_fun87661);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/native/ModerateUserActionSheet.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun87661({user, guild}) { // fn#87661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:308, offset: 0x01fc6d32, size: 1415 bytes, params: 2, frame: 33
|
||||
var r8;
|
||||
var r7;
|
||||
var push;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
var t;
|
||||
var isMemberCommunicationDisabled2;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
|
||||
return GuildMemberStore.getMember(guild?.id, user.id);
|
||||
}, [user, guild]);
|
||||
const r12 = value2 != null ? value2.roles : [];
|
||||
const {canKickUser, canBanUser, canChangeNick, canManageRoles,
|
||||
canModerateMembers} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore,
|
||||
UserStore, GuildStore], _fun87663, [user, guild]);
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
if (value2 == null) {
|
||||
return null;
|
||||
}
|
||||
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guild.id, undefined, user);
|
||||
const env0_3 = (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet;
|
||||
items2 = [];
|
||||
const value5 = value2 != null;
|
||||
if (value5) {
|
||||
r8 = canKickUser || canBanUser;
|
||||
r8 = !r8 ? canChangeNick : r8;
|
||||
r8 = !r8 ? canManageRoles : r8;
|
||||
r7 = r8;
|
||||
} else {
|
||||
r7 = value5;
|
||||
}
|
||||
r7 = r7 && !user.isNonUserBot();
|
||||
if (r7) {
|
||||
items2.push(<ActionSheetRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HxrBOZ)} icon={((Icon) => <Icon IconComponent={(require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} onPress={onPress_87664} />);
|
||||
}
|
||||
if (value2 != null) {
|
||||
if (canModerateMembers) {
|
||||
isMemberCommunicationDisabled2 = (require(3773) /* metro dependency 3773: CommunicationDisabledUtils */).isMemberCommunicationDisabled(value2);
|
||||
push = items2.push;
|
||||
string = intl.string;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
Reflect.apply(push, items2, [<ActionSheetRow label={isMemberCommunicationDisabled2 ? Reflect.apply(string,
|
||||
intl,
|
||||
[t.qXtNtS]) : Reflect.apply(string, intl,
|
||||
[t.xpsADY])} icon={((Icon) => <Icon IconComponent={(require(10317) /* metro dependency 10317: ClockWarningIcon */).ClockWarningIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} onPress={onPress_87667} />]);
|
||||
}
|
||||
}
|
||||
if (value2 != null && canKickUser) {
|
||||
items2.push(<ActionSheetRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3glT6Z'])} icon={((Icon) => <Icon IconComponent={(require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} variant="danger" onPress={onPress_87668} />);
|
||||
}
|
||||
if (value2 != null && canBanUser) {
|
||||
items2.push(<ActionSheetRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5MBJ5M'])} icon={((Icon) => <Icon IconComponent={(require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} variant="danger" onPress={onPress_87670} />);
|
||||
}
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const object = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
object.header = <BottomSheetTitleHeader title={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['792QKT'],
|
||||
{nick: name})} />;
|
||||
object.bodyStyles = styles.container;
|
||||
let value = importDefault(11451) /* metro dependency 11451: MemberRolesList */;
|
||||
value = ((Component) => <Component style={[styles.memberRoles]} guild={guild} userRoles={r12} />)(value);
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<BottomSheet {...object}>
|
||||
{value}
|
||||
<TableRowGroup hasIcons>
|
||||
{items2.map(_fun87672)}
|
||||
</TableRowGroup>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87663() { // fn#87663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:494, offset: 0x01fc72f2, size: 334 bytes, params: 1, frame: 19
|
||||
var r1;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var value5;
|
||||
var moduleValue2;
|
||||
var value12;
|
||||
var moduleValue3;
|
||||
const object2 = {};
|
||||
const value2 = guild != null;
|
||||
if (value2) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(10289) /* metro dependency 10289: GuildMemberUtils */;
|
||||
r1 = moduleValue.canKickMember(user, guild);
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
object2.canKickUser = r1;
|
||||
const value4 = guild != null;
|
||||
if (value4) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue2 = require(10289) /* metro dependency 10289: GuildMemberUtils */;
|
||||
r1 = moduleValue2.canBanMember(user, guild);
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
object2.canBanUser = r1;
|
||||
object2.canChangeNick = guild != null && PermissionStore.canManageUser(Permissions.MANAGE_NICKNAMES, user, guild);
|
||||
object2.canManageRoles = guild != null && PermissionStore.can(Permissions.MANAGE_ROLES, guild);
|
||||
const value11 = guild != null;
|
||||
if (value11) {
|
||||
value12 = environment.__proto__;
|
||||
moduleValue3 = require(8037) /* metro dependency 8037: useCanToggleCommunicationDisableOnUser */;
|
||||
r1 = moduleValue3.canToggleCommunicationDisableOnUser(guild.id, user.id, [UserStore, GuildStore,
|
||||
PermissionStore]);
|
||||
} else {
|
||||
r1 = value11;
|
||||
}
|
||||
object2.canModerateMembers = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function onPress_87664() { // fn#87664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:1210, offset: 0x01fc7440, size: 138 bytes, params: 1, frame: 17
|
||||
hideActionSheet();
|
||||
const defaultImport = importDefault(dependencyMap[16]);
|
||||
defaultImport.pushLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths), {userId: user.id,
|
||||
guildId: guild.id, onClose: onClose_87665, onRemove: onRemove});
|
||||
}
|
||||
|
||||
function onPress_87667() { // fn#87667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:1652, offset: 0x01fc753a, size: 117 bytes, params: 1, frame: 15
|
||||
var openDisableCommunication;
|
||||
var openEnableCommunication;
|
||||
hideActionSheet();
|
||||
let binding = env0_4;
|
||||
const guildDisableCommunicationActionCreatorsNativeModule = require(10299) /* metro dependency 10299: GuildDisableCommunicationActionCreatorsNative */;
|
||||
if (binding) {
|
||||
openEnableCommunication = guildDisableCommunicationActionCreatorsNativeModule.openEnableCommunication;
|
||||
binding = env0_2;
|
||||
Reflect.apply(openEnableCommunication, guildDisableCommunicationActionCreatorsNativeModule,
|
||||
[{guildId: binding.guildId, userId: binding.userId}]);
|
||||
} else {
|
||||
openDisableCommunication = guildDisableCommunicationActionCreatorsNativeModule.openDisableCommunication;
|
||||
binding = env0_2;
|
||||
Reflect.apply(openDisableCommunication, guildDisableCommunicationActionCreatorsNativeModule,
|
||||
[{guildId: binding.guildId, userId: binding.userId}]);
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_87668() { // fn#87668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:2011, offset: 0x01fc75af, size: 77 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(10321) /* metro dependency 10321: showKickConfirmModal */)({guildId: guild.id, userId: user.id,
|
||||
cancelButtonCallback: cancelButtonCallback});
|
||||
}
|
||||
|
||||
function onPress_87670() { // fn#87670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:2304, offset: 0x01fc7631, size: 77 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(10323) /* metro dependency 10323: showBanConfirmModal */)({guildId: guild.id, userId: user.id,
|
||||
cancelButtonCallback: cancelButtonCallback});
|
||||
}
|
||||
|
||||
function _fun87672(a0, a1) { // fn#87672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:2687, offset: 0x01fc767e, size: 64 bytes, params: 3, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const Fragment = env1_3.Fragment;
|
||||
return <Fragment {...{children: a0}} key={'action_' + a1} />;
|
||||
}
|
||||
|
||||
function onPress_87664OnClose() { // fn#87665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:1296, owner: onPress_87664.onClose, offset: 0x01fc74ca, size: 75 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
(importDefault(11449) /* metro dependency 11449: showModerateUserActionSheet */)({guild: guild, user: user});
|
||||
}
|
||||
|
||||
function onPress_87664OnRemove() { // fn#87666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:1355, owner: onPress_87664.onRemove, offset: 0x01fc7515, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function onPress_87668CancelButtonCallback() { // fn#87669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11636:2073, owner: onPress_87668.cancelButtonCallback, offset: 0x01fc75fc, size: 53 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (importDefault(11449) /* metro dependency 11449: showModerateUserActionSheet */)({guild: guild, user: user});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 11449; source: modules/guild_automod/native/showModerateUserActionSheet.tsx; dependencies: [4080, 11450, 1962, 2] */
|
||||
function _fun87658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11635:6, offset: 0x01fc6b43, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_automod/native/showModerateUserActionSheet.tsx');
|
||||
exports.default = showModerateUserActionSheet;
|
||||
}
|
||||
|
||||
function showModerateUserActionSheet(a0) { // fn#87659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11635:196, offset: 0x01fc6baa, size: 82 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'ModerateUserActionSheet', a0]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user