95 lines
5.3 KiB
TypeScript
95 lines
5.3 KiB
TypeScript
/* Metro module 11185; source: modules/messages/validateJumpWithAlert.tsx; dependencies: [1379, 3784, 3793, 661, 4647, 1244, 5050, 2] */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
|
|
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as IsSpamModule from './isSpam.tsx'; /* Metro dependency 5050 */
|
|
|
|
function _fun85448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11371:6, offset: 0x01f6ef42, size: 172 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/validateJumpWithAlert.tsx');
|
|
exports.default = validateJumpWithAlert;
|
|
function validateJumpWithAlert(a0, a1) { // fn#85449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11371:234, offset: 0x01f6efee, size: 1076 bytes, params: 3, frame: 23
|
|
var channelStoreBinding;
|
|
var value3;
|
|
var permissionStoreBinding;
|
|
var defaultImport;
|
|
var show;
|
|
var object;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
var defaultImport4;
|
|
let relationshipStoreBinding = RelationshipStore;
|
|
if (relationshipStoreBinding.isBlockedForMessage(a0)) {
|
|
defaultImport4 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
show = defaultImport4.show;
|
|
object = {};
|
|
object.title = intl.string(t['j7eA/g']);
|
|
object.body = intl.formatToPlainString(t.dTNNgr, {name: a0.author.username});
|
|
object.confirmText = intl.string(t.BddRzS);
|
|
Reflect.apply(show, defaultImport4, [object]);
|
|
return false;
|
|
}
|
|
relationshipStoreBinding = RelationshipStore;
|
|
if (relationshipStoreBinding.isIgnoredForMessage(a0)) {
|
|
defaultImport3 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
show = defaultImport3.show;
|
|
object = {};
|
|
object.title = intl.string(t.XyWoKV);
|
|
object.body = intl.formatToPlainString(t['8t8doK'], {name: a0.author.username});
|
|
object.confirmText = intl.string(t.BddRzS);
|
|
Reflect.apply(show, defaultImport3, [object]);
|
|
return false;
|
|
}
|
|
const value2 = undefined;
|
|
if (IsSpamModule.isSpam(a0)) {
|
|
channelStoreBinding = ChannelStore;
|
|
value3 = channelStoreBinding.getChannel(a0.channel_id);
|
|
if (value3 == null ? value2 : value3.isPrivate()) {
|
|
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
show = defaultImport2.show;
|
|
object = {};
|
|
object.title = intl.string(t['cZcG+P']);
|
|
object.body = intl.formatToPlainString(t['1YTWty'], {name: a0.author.username});
|
|
object.confirmText = intl.string(t['+TSRGD']);
|
|
object.cancelText = intl.string(t['ETE/oC']);
|
|
object.onConfirm = a1;
|
|
Reflect.apply(show, defaultImport2, [object]);
|
|
} else {
|
|
permissionStoreBinding = PermissionStore;
|
|
if (permissionStoreBinding.can(Permissions.MODERATE_MEMBERS, value3)) {
|
|
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
show = defaultImport2.show;
|
|
object = {};
|
|
object.title = intl.string(t['cZcG+P']);
|
|
object.body = intl.formatToPlainString(t['1YTWty'], {name: a0.author.username});
|
|
object.confirmText = intl.string(t['+TSRGD']);
|
|
object.cancelText = intl.string(t['ETE/oC']);
|
|
object.onConfirm = a1;
|
|
Reflect.apply(show, defaultImport2, [object]);
|
|
} else {
|
|
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
|
show = defaultImport.show;
|
|
object = {};
|
|
object.title = intl.string(t['6vJKFk']);
|
|
object.body = intl.formatToPlainString(t.zKNgPF, {name: a0.author.username});
|
|
object.confirmText = intl.string(t.BddRzS);
|
|
Reflect.apply(show, defaultImport, [object]);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun85448, 11185, [1379, 3784, 3793, 661, 4647, 1244, 5050,
|
|
2]) /* metro module 11185, dependencies: [1379, 3784, 3793, 661, 4647, 1244, 5050, 2] */;
|