This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,102 +1,117 @@
/* Metro module 11903; source: modules/message_request/native/spam/SpamMessageHamActionSheet.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 566, 11898, 3857, 1244, 8947, 4080, 6275, 6758, 6806, 7972, 4578, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetCloseButtonNativeModule from '../../../../design/components/Sheet/native/ActionSheetCloseButton.native.tsx'; /* Metro dependency 6806 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun91357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:6, offset: 0x0205c4d3, size: 360 bytes, params: 8, frame: 23
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;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.header = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object4 = {};
object.header = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object3 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginTop = PX_24;
object3.marginTop = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object2.container = object4;
object3.paddingHorizontal = PX_16;
object.container = object3;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.buttonContainer = {marginTop: PX_24};
object2.switch = {paddingHorizontal: 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/message_request/native/spam/SpamMessageHamActionSheet.tsx');
object.buttonContainer = {marginTop: PX_24};
object.switch = {paddingHorizontal: 0};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/message_request/native/spam/SpamMessageHamActionSheet.tsx');
exports.default = SpamMessageRequestHamActionSheet;
}
function SpamMessageRequestHamActionSheet({channel, onConfirm, onCancel}) { // fn#91358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:525, offset: 0x0205c63b, size: 712 bytes, params: 2, frame: 31
const closure = function() {
onCancel();
};
const styles = useStyles();
const [property, env0_4] = env0_3(env0_4Binding.useState(false), 2);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value4 = (require(11898) /* metro dependency 11898: useMessageRequestActions */).useMessageRequestActions({user: user,
onError: function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {key: 'MESSAGE_REQUEST_REQUEST_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t['EDYbS+']);
object.icon = importDefault(dependencyMap[11]);
defaultImport.open(object);
}, onAcceptSuccess: onAcceptSuccess});
const env0_5 = value4.acceptMessageRequest;
const isAcceptLoading = value4.isAcceptLoading;
const isUserProfileLoading = value4.isUserProfileLoading;
const isOptimisticAccepted = value4.isOptimisticAccepted;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['9ty6yc']]);
const ActionSheetCloseButton = (require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton;
object.trailing = <ActionSheetCloseButton onPress={closure} />;
object.backgroundColor = styles.header;
const bottomSheetTitleHeader = <BottomSheetTitleHeader {...object} />;
const FormSwitchRow = (require(7972) /* metro dependency 7972: native */).FormSwitchRow;
const object3 = {style: styles.switch};
string = intl.string;
const ZhGpNQ = (require(1244) /* metro dependency 1244: indexNative */).t.ZhGpNQ;
object3.label = Reflect.apply(string, intl, [ZhGpNQ]);
object3.value = property;
object3.switchProps = {renderIosBackground: true};
object3.onValueChange = onValueChange_91363;
const formSwitchRow = <FormSwitchRow {...object3} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {size: 'md', onPress: onPress_91364,
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olZgw5)};
let r14 = isAcceptLoading || isUserProfileLoading;
r14 = !r14 ? isOptimisticAccepted : r14;
buttonProps.disabled = r14;
buttonProps.loading = isAcceptLoading || isOptimisticAccepted;
return (
<BottomSheet onDismiss={closure}>
{bottomSheetTitleHeader}
<View style={styles.container}>
{formSwitchRow}
<View style={styles.buttonContainer}>
<Button {...buttonProps} />
function SpamMessageRequestHamActionSheet({channel, onConfirm, onCancel}) { // fn#91358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:525, offset: 0x0205c63b, size: 712 bytes, params: 2, frame: 31
const closure = function() {
onCancel();
};
const styles = useStyles();
const [property, env0_4] = Module00057(env0_4Binding.useState(false), 2);
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value4 = (require(11898) /* metro dependency 11898: useMessageRequestActions */).useMessageRequestActions({user: user,
onError: function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {key: 'MESSAGE_REQUEST_REQUEST_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[10]).intl.string(require(dependencyMap[10]).t['EDYbS+']);
object.icon = importDefault(dependencyMap[11]);
defaultImport.open(object);
}, onAcceptSuccess: onAcceptSuccess});
const env0_5 = value4.acceptMessageRequest;
const isAcceptLoading = value4.isAcceptLoading;
const isUserProfileLoading = value4.isUserProfileLoading;
const isOptimisticAccepted = value4.isOptimisticAccepted;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['9ty6yc']]);
const ActionSheetCloseButton = (ActionSheetCloseButtonNativeModule).ActionSheetCloseButton;
object2.trailing = <ActionSheetCloseButton onPress={closure} />;
object2.backgroundColor = styles.header;
const bottomSheetTitleHeader = <BottomSheetTitleHeader {...object2} />;
const FormSwitchRow = (NativeModule).FormSwitchRow;
const object4 = {style: styles.switch};
string = intl.string;
const ZhGpNQ = (require(1244) /* metro dependency 1244: indexNative */).t.ZhGpNQ;
object4.label = Reflect.apply(string, intl, [ZhGpNQ]);
object4.value = property;
object4.switchProps = {renderIosBackground: true};
object4.onValueChange = onValueChange_91363;
const formSwitchRow = <FormSwitchRow {...object4} />;
const Button = (ButtonNativeModule).Button;
const buttonProps = {size: 'md', onPress: onPress_91364,
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olZgw5)};
let r14 = isAcceptLoading || isUserProfileLoading;
r14 = !r14 ? isOptimisticAccepted : r14;
buttonProps.disabled = r14;
buttonProps.loading = isAcceptLoading || isOptimisticAccepted;
return (
<BottomSheet onDismiss={closure}>
{bottomSheetTitleHeader}
<View style={styles.container}>
{formSwitchRow}
<View style={styles.buttonContainer}>
<Button {...buttonProps} />
</View>
</View>
</View>
</BottomSheet>
);
}
function onAcceptSuccess() { // fn#91362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:925, owner: SpamMessageRequestHamActionSheet.onAcceptSuccess, offset: 0x0205c9a1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function SpamMessageRequestHamActionSheetOnPress() { // fn#91364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:1586, owner: SpamMessageRequestHamActionSheet.onPress, offset: 0x0205c9c6, size: 38 bytes, params: 1, frame: 12
onConfirm(env0_3);
acceptMessageRequest(channel.id);
</BottomSheet>
);
function onAcceptSuccess() { // fn#91362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:925, owner: SpamMessageRequestHamActionSheet.onAcceptSuccess, offset: 0x0205c9a1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
function SpamMessageRequestHamActionSheetOnValueChange(a0) { // fn#91363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:1501, owner: SpamMessageRequestHamActionSheet.onValueChange, offset: 0x013d5d47, size: 19 bytes, params: 2, frame: 11
return env0_4(a0);
}
function SpamMessageRequestHamActionSheetOnPress() { // fn#91364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12089:1586, owner: SpamMessageRequestHamActionSheet.onPress, offset: 0x0205c9c6, size: 38 bytes, params: 1, frame: 12
onConfirm(Module00057);
acceptMessageRequest(channel.id);
}
}
}
global.__d(_fun91357, 11903, [57, 31, 27, 1878, 33, 4501, 697, 566, 11898, 3857, 1244, 8947, 4080, 6275, 6758, 6806,
7972, 4578,
2]) /* metro module 11903, dependencies: [57, 31, 27, 1878, 33, 4501, 697, 566, 11898, 3857, 1244, 8947, 4080, 6275, 6758, 6806, 7972, 4578, 2] */;
@@ -1,277 +1,321 @@
/* Metro module 15252; source: modules/message_request/native/spam/SpamMessageList.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 11908, 3857, 8947, 4601, 5080, 11898, 683, 5278, 15236, 1305, 8096, 13436, 7972, 1585, 15245, 15253, 15243, 4594, 4826, 4831, 15246, 477, 4573, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseMountEffect from '../../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import MonitoringAgent from '../../../monitoring/MonitoringAgent.tsx'; /* Metro dependency 4826 */
import MessageRequestRowSenderDetails from '../MessageRequestRowSenderDetails.tsx'; /* Metro dependency 15236 */
import UseSortedSpamMessageRequests from '../../hooks/useSortedSpamMessageRequests.tsx'; /* Metro dependency 15253 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MetricEventsModule from '../../../../external/discord_common/js/shared/shared-constants/MetricEvents.tsx'; /* Metro dependency 4831 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseMessageRequestActionsModule from '../../hooks/useMessageRequestActions.tsx'; /* Metro dependency 11898 */
import * as UseLongestChannelMessageBeforeReplyModule from '../../../messages/useLongestChannelMessageBeforeReply.tsx'; /* Metro dependency 11908 */
import * as UseListHasSingleMessageRequestModule from '../../hooks/useListHasSingleMessageRequest.tsx'; /* Metro dependency 15243 */
import * as UseSpamMessageRequestsCountModule from '../../hooks/useSpamMessageRequestsCount.tsx'; /* Metro dependency 15245 */
function _fun116619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:6, offset: 0x024903e1, size: 586 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.ActivityIndicator;
const env0_5 = value.View;
const env0_6 = value.FlatList;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.sectionContainer = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'space-between',
object.sectionContainer = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'space-between',
'marginTop': 6, 'marginBottom': 10, backgroundColor: BACKGROUND_BASE_LOW};
object2.rowContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.rowContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginTop': 14, 'marginBottom': 12};
object2.actionContainer = {'flexDirection': 'row', 'alignItems': 'flex-start', 'height': '100%'};
const object4 = {'backgroundColor': null, 'tintColor': null, 'borderRadius': null, 'alignItems': 'center',
object.actionContainer = {'flexDirection': 'row', 'alignItems': 'flex-start', 'height': '100%'};
const object3 = {'backgroundColor': null, 'tintColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'height': 32, 'width': 32};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object4.tintColor = INTERACTIVE_TEXT_DEFAULT;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.actionButton = object4;
object2.acceptButton = {marginRight: 16};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.pressableRow = object6;
object2.activityIndicator = {'height': 16, 'width': 16};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.list = {'flex': 1, 'paddingHorizontal': 16, 'alignSelf': 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
object2 = {ACCEPT_SPAM_MESSAGE: 'accept-spam-message-request', IGNORE_SPAM_MESSAGE: 'ignore-spam-message-request',
PREVIEW_SPAM_MESSAGE: 'preview-spam-message-request'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/message_request/native/spam/SpamMessageList.tsx');
exports.default = SpamMessageList;
}
function PendingSpamMessageRequestRow({messageRequest, goToMessageRequestPreview, isLastRow, hasSingleMessageRequest}) { // fn#116620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1200, offset: 0x0249062b, size: 1369 bytes, params: 2, frame: 45
var object11;
const styles = useStyles();
const user = messageRequest.user;
let channel = messageRequest.channel;
const env0_3 = channel;
const id = channel.id;
const useLongestChannelMessageBeforeReplyModule = require(11908) /* metro dependency 11908: useLongestChannelMessageBeforeReply */;
const useLongestChannelMessageBeforeReply = useLongestChannelMessageBeforeReplyModule.useLongestChannelMessageBeforeReply;
const getRecipientId = channel.getRecipientId;
const env0_5 = Reflect.apply(useLongestChannelMessageBeforeReply, useLongestChannelMessageBeforeReplyModule, [id,
Reflect.apply(getRecipientId, channel, [])]);
let binding = env0_3;
let useCallback = binding.useCallback;
let closure = function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'MESSAGE_REQUESTS_SPAM_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.pIQ3h4);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
};
const value3 = Reflect.apply(useCallback, binding, [closure, []]);
binding = env0_3;
useCallback = binding.useCallback;
const value5 = (require(11898) /* metro dependency 11898: useMessageRequestActions */).useMessageRequestActions({user: user,
onAcceptSuccess: Reflect.apply(useCallback, binding, [_fun116622, [id, hasSingleMessageRequest]]),
onError: value3});
const env0_6 = value5.rejectMessageRequest;
const isAcceptLoading = value5.isAcceptLoading;
const isRejectLoading = value5.isRejectLoading;
const isUserProfileLoading = value5.isUserProfileLoading;
const isOptimisticAccepted = value5.isOptimisticAccepted;
const isOptimisticRejected = value5.isOptimisticRejected;
const env0_7 = value5.markAsNotSpam;
closure = function() {
rejectMessageRequest(channel.id);
};
const closure2 = onPress_116624;
const closure3 = function() {
var defaultImport = importDefault(dependencyMap[13]);
var MESSAGE_REQUEST_PREVIEW_VIEWED = AnalyticEvents.MESSAGE_REQUEST_PREVIEW_VIEWED;
defaultImport.track(MESSAGE_REQUEST_PREVIEW_VIEWED, {is_spam: true, channel_id: channel.id,
other_user_id: user.id});
goToMessageRequestPreview();
};
let r20 = isAcceptLoading || isRejectLoading;
r20 = !r20 ? isUserProfileLoading : r20;
r20 = !r20 ? isOptimisticAccepted : r20;
r20 = !r20 ? isOptimisticRejected : r20;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object11 = {onPress: closure3, accessibilityRole: 'button'};
object3.tintColor = INTERACTIVE_TEXT_DEFAULT;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.actionButton = object3;
object.acceptButton = {marginRight: 16};
const object5 = {};
const ACCEPT_SPAM_MESSAGE = env0_11.ACCEPT_SPAM_MESSAGE;
object5.name = ACCEPT_SPAM_MESSAGE;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object5.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.apePSa]);
const items2 = [object5];
const object6 = {};
const IGNORE_SPAM_MESSAGE = env0_11.IGNORE_SPAM_MESSAGE;
object6.name = IGNORE_SPAM_MESSAGE;
string = intl.string;
const MWOV9D = (require(1244) /* metro dependency 1244: indexNative */).t.MWOV9D;
object6.label = Reflect.apply(string, intl, [MWOV9D]);
items2[1] = object6;
const object7 = {};
const PREVIEW_SPAM_MESSAGE = env0_11.PREVIEW_SPAM_MESSAGE;
object7.name = PREVIEW_SPAM_MESSAGE;
string = intl.string;
const I6PFLB = (require(1244) /* metro dependency 1244: indexNative */).t.I6PFLB;
object7.label = Reflect.apply(string, intl, [I6PFLB]);
items2[2] = object7;
object11.accessibilityActions = items2;
object11.onAccessibilityAction = onAccessibilityAction_116626;
object11.style = styles.pressableRow;
const MessageRequestRowSenderDetails = importDefault(15236) /* metro dependency 15236: MessageRequestRowSenderDetails */;
channel = messageRequest.channel;
const user2 = messageRequest.user;
const messageRequestRowSenderDetails = <MessageRequestRowSenderDetails channel={channel} otherUser={user2} />;
const PressableOpacity2 = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
let formatToPlainString = intl.formatToPlainString;
let property = (require(1244) /* metro dependency 1244: indexNative */).t['6p0yBo'];
const object8 = {};
object8.name = user?.toString();
const pressableOpacity = <PressableOpacity2 accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [property, object8])} onPress={closure2} disabled={r20} style={[styles.actionButton,
styles.acceptButton]}>{isAcceptLoading || isUserProfileLoading || isOptimisticAccepted ? <ActivityIndicator style={styles.activityIndicator} /> : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(8096) /* metro dependency 8096 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity2>;
const PressableOpacity3 = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['C9Xe6+'];
const object10 = {};
object10.name = user?.toString();
return (
<PressableOpacity {...object11}>
<View style={styles.rowContainer}>
{messageRequestRowSenderDetails}
<View style={styles.actionContainer}>
{pressableOpacity}
<PressableOpacity3
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object10])}
onPress={closure}
disabled={r20}
style={styles.actionButton}
>
{isRejectLoading || isOptimisticRejected ? <ActivityIndicator style={styles.activityIndicator} /> : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</PressableOpacity3>
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.pressableRow = object5;
object.activityIndicator = {'height': 16, 'width': 16};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.list = {'flex': 1, 'paddingHorizontal': 16, 'alignSelf': 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
const env0_10 = Reflect.apply(createStyles, value, [object]);
object = {ACCEPT_SPAM_MESSAGE: 'accept-spam-message-request', IGNORE_SPAM_MESSAGE: 'ignore-spam-message-request',
PREVIEW_SPAM_MESSAGE: 'preview-spam-message-request'};
(FileImportTrackerModule).fileFinishedImporting('modules/message_request/native/spam/SpamMessageList.tsx');
exports.default = SpamMessageList;
function PendingSpamMessageRequestRow({messageRequest, goToMessageRequestPreview, isLastRow, hasSingleMessageRequest}) { // fn#116620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1200, offset: 0x0249062b, size: 1369 bytes, params: 2, frame: 45
var object12;
const styles = useStyles();
const user = messageRequest.user;
let channel = messageRequest.channel;
const channel2 = channel;
const id = channel.id;
const useLongestChannelMessageBeforeReply = UseLongestChannelMessageBeforeReplyModule.useLongestChannelMessageBeforeReply;
const getRecipientId = channel.getRecipientId;
const env0_5 = Reflect.apply(useLongestChannelMessageBeforeReply, UseLongestChannelMessageBeforeReplyModule, [id,
Reflect.apply(getRecipientId, channel, [])]);
let binding = channel2;
let useCallback = binding.useCallback;
let closure = function() {
var defaultImport = importDefault(dependencyMap[8]);
var object = {key: 'MESSAGE_REQUESTS_SPAM_ERROR_ALERT_TITLE'};
object.content = require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.pIQ3h4);
object.icon = importDefault(dependencyMap[9]);
defaultImport.open(object);
};
const value3 = Reflect.apply(useCallback, binding, [closure, []]);
binding = channel2;
useCallback = binding.useCallback;
const value5 = (UseMessageRequestActionsModule).useMessageRequestActions({user: user,
onAcceptSuccess: Reflect.apply(useCallback, binding, [_fun116622, [id, hasSingleMessageRequest]]),
onError: value3});
const env0_6 = value5.rejectMessageRequest;
const isAcceptLoading = value5.isAcceptLoading;
const isRejectLoading = value5.isRejectLoading;
const isUserProfileLoading = value5.isUserProfileLoading;
const isOptimisticAccepted = value5.isOptimisticAccepted;
const isOptimisticRejected = value5.isOptimisticRejected;
const env0_7 = value5.markAsNotSpam;
closure = function() {
rejectMessageRequest(channel.id);
};
const onPress_1166242 = onPress_116624;
const closure3 = function() {
var defaultImport = importDefault(dependencyMap[13]);
var MESSAGE_REQUEST_PREVIEW_VIEWED = AnalyticEvents.MESSAGE_REQUEST_PREVIEW_VIEWED;
defaultImport.track(MESSAGE_REQUEST_PREVIEW_VIEWED, {is_spam: true, channel_id: channel.id,
other_user_id: user.id});
goToMessageRequestPreview();
};
let r20 = isAcceptLoading || isRejectLoading;
r20 = !r20 ? isUserProfileLoading : r20;
r20 = !r20 ? isOptimisticAccepted : r20;
r20 = !r20 ? isOptimisticRejected : r20;
const PressableOpacity = (PressablesModule).PressableOpacity;
object12 = {onPress: closure3, accessibilityRole: 'button'};
let object = {};
const ACCEPT_SPAM_MESSAGE = env0_11.ACCEPT_SPAM_MESSAGE;
object.name = ACCEPT_SPAM_MESSAGE;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.apePSa]);
const items2 = [object];
const object2 = {};
const IGNORE_SPAM_MESSAGE = env0_11.IGNORE_SPAM_MESSAGE;
object2.name = IGNORE_SPAM_MESSAGE;
string = intl.string;
const MWOV9D = (require(1244) /* metro dependency 1244: indexNative */).t.MWOV9D;
object2.label = Reflect.apply(string, intl, [MWOV9D]);
items2[1] = object2;
const object3 = {};
const PREVIEW_SPAM_MESSAGE = env0_11.PREVIEW_SPAM_MESSAGE;
object3.name = PREVIEW_SPAM_MESSAGE;
string = intl.string;
const I6PFLB = (require(1244) /* metro dependency 1244: indexNative */).t.I6PFLB;
object3.label = Reflect.apply(string, intl, [I6PFLB]);
items2[2] = object3;
object12.accessibilityActions = items2;
object12.onAccessibilityAction = onAccessibilityAction_116626;
object12.style = styles.pressableRow;
channel = messageRequest.channel;
const user2 = messageRequest.user;
const messageRequestRowSenderDetails = <MessageRequestRowSenderDetails channel={channel} otherUser={user2} />;
const PressableOpacity2 = (PressablesModule).PressableOpacity;
let formatToPlainString = intl.formatToPlainString;
let property = (require(1244) /* metro dependency 1244: indexNative */).t['6p0yBo'];
const object4 = {};
object4.name = user?.toString();
const pressableOpacity = (
<PressableOpacity2
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object4])}
onPress={onPress_1166242}
disabled={r20}
style={[styles.actionButton, styles.acceptButton]}
>
{
isAcceptLoading || isUserProfileLoading || isOptimisticAccepted
? (
<ActivityIndicator style={styles.activityIndicator} />
)
: ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(8096) /* metro dependency 8096 */} />)((require(1305) /* metro dependency 1305: native */).Icon)
}
</PressableOpacity2>
);
const PressableOpacity3 = (PressablesModule).PressableOpacity;
formatToPlainString = intl.formatToPlainString;
property = (require(1244) /* metro dependency 1244: indexNative */).t['C9Xe6+'];
const object9 = {};
object9.name = user?.toString();
return (
<PressableOpacity {...object12}>
<View style={styles.rowContainer}>
{messageRequestRowSenderDetails}
<View style={styles.actionContainer}>
{pressableOpacity}
<PressableOpacity3
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object9])}
onPress={closure}
disabled={r20}
style={styles.actionButton}
>
{
isRejectLoading || isOptimisticRejected
? (
<ActivityIndicator style={styles.activityIndicator} />
)
: ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)
}
</PressableOpacity3>
</View>
</View>
</View>
{isLastRow ? null : ((FormDivider) => <FormDivider iconPush outer />)((require(7972) /* metro dependency 7972: native */).FormDivider)}
</PressableOpacity>
);
}
function SpamMessageList({goToMessageRequestPreview}) { // fn#116627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:3746, offset: 0x02490d34, size: 431 bytes, params: 2, frame: 24
var MessageRequestEmpty;
var intl;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_2 = (require(15245) /* metro dependency 15245: useSpamMessageRequestsCount */).useSpamMessageRequestCount();
const value2 = (importDefault(15253) /* metro dependency 15253: useSortedSpamMessageRequests */)();
const env0_4 = (require(15243) /* metro dependency 15243: useListHasSingleMessageRequest */).useListHasSingleSpamMessageRequest();
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun116628);
if (value2.length === 0) {
MessageRequestEmpty = importDefault(15246) /* metro dependency 15246: MessageRequestEmpty */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return <MessageRequestEmpty bodyText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hasFPQ)} />;
}
const items2 = ['header-section'];
arraySpread(items2, value2, 1, undefined);
const items3 = [styles.list];
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items3[1] = {marginBottom: platformUtilsModule.isAndroid() ? bottom : 0};
return (
<FlatList
style={items3}
scrollIndicatorInsets={{right: 0.01}}
contentContainerStyle={{paddingBottom: bottom, paddingTop: 12}}
renderItem={renderItem_116629}
data={items2}
/>
);
}
function _fun116622() { // fn#116622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1596, offset: 0x02490bff, size: 80 bytes, params: 1, frame: 14
var value2;
var moduleValue;
if (hasSingleMessageRequest) {
value2 = environment.__proto__;
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue.transitionToChannel(id);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
}
function PendingSpamMessageRequestRowOnPress_116624() { // fn#116624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1962, owner: PendingSpamMessageRequestRow.onPress, offset: 0x02490c4f, size: 25 bytes, params: 1, frame: 13
markAsNotSpam(channel, env0_5);
}
function PendingSpamMessageRequestRowOnAccessibilityAction({nativeEvent}) { // fn#116626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:2466, owner: PendingSpamMessageRequestRow.onAccessibilityAction, offset: 0x02490cc7, size: 109 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
const ACCEPT_SPAM_MESSAGE = env1_11.ACCEPT_SPAM_MESSAGE;
if (ACCEPT_SPAM_MESSAGE === actionName) {
onPress_116624();
} else {
var IGNORE_SPAM_MESSAGE = env1_11.IGNORE_SPAM_MESSAGE;
if (IGNORE_SPAM_MESSAGE === actionName) {
onPress_116623();
return undefined;
{
isLastRow
? null
: ((FormDivider) => <FormDivider iconPush outer />)((require(7972) /* metro dependency 7972: native */).FormDivider)
}
</PressableOpacity>
);
function _fun116622() { // fn#116622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1596, offset: 0x02490bff, size: 80 bytes, params: 1, frame: 14
var value2;
var moduleValue;
if (hasSingleMessageRequest) {
value2 = environment.__proto__;
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue.transitionToChannel(id);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
}
var PREVIEW_SPAM_MESSAGE = env1_11.PREVIEW_SPAM_MESSAGE;
if (PREVIEW_SPAM_MESSAGE === actionName) {
onPress_116625();
return undefined;
function PendingSpamMessageRequestRowOnPress_116624() { // fn#116624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:1962, owner: PendingSpamMessageRequestRow.onPress, offset: 0x02490c4f, size: 25 bytes, params: 1, frame: 13
markAsNotSpam(channel, env0_5);
}
function PendingSpamMessageRequestRowOnAccessibilityAction({nativeEvent}) { // fn#116626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:2466, owner: PendingSpamMessageRequestRow.onAccessibilityAction, offset: 0x02490cc7, size: 109 bytes, params: 2, frame: 10
const actionName = nativeEvent.actionName;
const ACCEPT_SPAM_MESSAGE = env1_11.ACCEPT_SPAM_MESSAGE;
if (ACCEPT_SPAM_MESSAGE === actionName) {
onPress_116624();
} else {
var IGNORE_SPAM_MESSAGE = env1_11.IGNORE_SPAM_MESSAGE;
if (IGNORE_SPAM_MESSAGE === actionName) {
onPress_116623();
return undefined;
}
var PREVIEW_SPAM_MESSAGE = env1_11.PREVIEW_SPAM_MESSAGE;
if (PREVIEW_SPAM_MESSAGE === actionName) {
onPress_116625();
return undefined;
}
}
}
}
}
function _fun116628() { // fn#116628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:3946, offset: 0x02490ee3, size: 121 bytes, params: 1, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SPAM_MESSAGE_REQUESTS_VIEWED = AnalyticEvents.SPAM_MESSAGE_REQUESTS_VIEWED;
Reflect.apply(track, defaultImport, [SPAM_MESSAGE_REQUESTS_VIEWED, {num_spam_message_requests: env0_2}]);
const defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
const increment = defaultImport2.increment;
const MetricEvents = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents;
const SPAM_MESSAGE_REQUEST_VIEW = MetricEvents.SPAM_MESSAGE_REQUEST_VIEW;
Reflect.apply(increment, defaultImport2, [{name: SPAM_MESSAGE_REQUEST_VIEW}]);
}
function SpamMessageList({goToMessageRequestPreview}) { // fn#116627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:3746, offset: 0x02490d34, size: 431 bytes, params: 2, frame: 24
var MessageRequestEmpty;
var intl;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const env0_2 = (UseSpamMessageRequestsCountModule).useSpamMessageRequestCount();
const value2 = (UseSortedSpamMessageRequests)();
const env0_4 = (UseListHasSingleMessageRequestModule).useListHasSingleSpamMessageRequest();
(UseMountEffect)(_fun116628);
if (value2.length === 0) {
MessageRequestEmpty = importDefault(15246) /* metro dependency 15246: MessageRequestEmpty */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return <MessageRequestEmpty bodyText={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hasFPQ)} />;
}
const items2 = ['header-section'];
arraySpread(items2, value2, 1, undefined);
const items3 = [styles.list];
items3[1] = {marginBottom: PlatformUtilsModule.isAndroid() ? bottom : 0};
return (
<FlatList
style={items3}
scrollIndicatorInsets={{right: 0.01}}
contentContainerStyle={{paddingBottom: bottom, paddingTop: 12}}
renderItem={renderItem_116629}
data={items2}
/>
);
function _fun116628() { // fn#116628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:3946, offset: 0x02490ee3, size: 121 bytes, params: 1, frame: 18
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const SPAM_MESSAGE_REQUESTS_VIEWED = AnalyticEvents.SPAM_MESSAGE_REQUESTS_VIEWED;
Reflect.apply(track, defaultImport, [SPAM_MESSAGE_REQUESTS_VIEWED, {num_spam_message_requests: env0_2}]);
const defaultImport2 = MonitoringAgent;
const increment = defaultImport2.increment;
const MetricEvents = (MetricEventsModule).MetricEvents;
const SPAM_MESSAGE_REQUEST_VIEW = MetricEvents.SPAM_MESSAGE_REQUEST_VIEW;
Reflect.apply(increment, defaultImport2, [{name: SPAM_MESSAGE_REQUEST_VIEW}]);
}
function SpamMessageListRenderItem({item}) { // fn#116629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:4383, owner: SpamMessageList.renderItem, offset: 0x02490f5c, size: 316 bytes, params: 2, frame: 24
var environment;
var id;
var r0;
var value;
var object;
var channel;
var id2;
var binding;
var property;
var Text;
var intl;
if (typeof item === 'string') {
value = environment.__proto__;
var viewBindingProps = {style: styles.sectionContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = (
<View {...viewBindingProps}>
<Text variant="eyebrow" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.aNh5Kf,
{count: ReactModule.length})}
</Text>
</View>
);
r0 = value;
} else {
value = environment.__proto__;
object = {messageRequest: item, goToMessageRequestPreview: function() {
return goToMessageRequestPreview(item.channel.id);
}};
channel = item.channel;
id2 = channel.id;
binding = ReactModule;
property = binding[binding.length - 1];
id = property == null ? undefined : property.channel.id;
object.isLastRow = id2 === id;
object.hasSingleMessageRequest = env0_4;
channel = item.channel;
id = channel.id;
value = <PendingSpamMessageRequestRow {...object} key={id} />;
r0 = value;
}
return r0;
}
function SpamMessageListRenderItem({item}) { // fn#116629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15449:4383, owner: SpamMessageList.renderItem, offset: 0x02490f5c, size: 316 bytes, params: 2, frame: 24
var environment;
var id;
var r0;
var value;
var object2;
var channel;
var id2;
var binding;
var property;
var Text;
var intl;
if (typeof item === 'string') {
value = environment.__proto__;
var viewBindingProps = {style: styles.sectionContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = <View {...viewBindingProps}><Text variant="eyebrow" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.aNh5Kf,
{count: env0_3.length})}</Text></View>;
r0 = value;
} else {
value = environment.__proto__;
object2 = {messageRequest: item, goToMessageRequestPreview: function() {
return goToMessageRequestPreview(item.channel.id);
}};
channel = item.channel;
id2 = channel.id;
binding = env0_3;
property = binding[binding.length - 1];
id = property == null ? undefined : property.channel.id;
object2.isLastRow = id2 === id;
object2.hasSingleMessageRequest = env0_4;
channel = item.channel;
id = channel.id;
value = <PendingSpamMessageRequestRow {...object2} key={id} />;
r0 = value;
}
return r0;
}
global.__d(_fun116619, 15252, [31, 27, 661, 33, 4501, 697, 1244, 11908, 3857, 8947, 4601, 5080, 11898, 683, 5278,
15236, 1305, 8096, 13436, 7972, 1585, 15245, 15253, 15243, 4594, 4826, 4831, 15246, 477, 4573,
2]) /* metro module 15252, dependencies: [31, 27, 661, 33, 4501, 697, 1244, 11908, 3857, 8947, 4601, 5080, 11898, 683, 5278, 15236, 1305, 8096, 13436, 7972, 1585, 15245, 15253, 15243, 4594, 4826, 4831, 15246, 477, 4573, 2] */;