1395 lines
79 KiB
TypeScript
1395 lines
79 KiB
TypeScript
/* Metro module 4832; source: modules/explicit_media_redaction/ExplicitMediaManager.tsx; dependencies: [7, 6, 15, 17, 18, 4833, 1226, 4791, 1379, 4814, 1934, 3969, 4837, 661, 670, 4821, 4838, 4839, 4841, 694, 4846, 4826, 4831, 4847, 4848, 21, 4625, 4857, 4860, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
|
|
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
|
|
import ChannelSectionStore from '../../stores/ChannelSectionStore.tsx'; /* Metro dependency 4791 */
|
|
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
|
|
import ReferencedMessageStore from '../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
|
|
import ExplicitMediaSearchStore from './ExplicitMediaSearchStore.tsx'; /* Metro dependency 4837 */
|
|
import Module04857 from '../../by-id/module-04857.js'; /* Metro dependency 4857 */
|
|
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
|
|
import * as ExplicitMediaRedactionUtilsModule from './ExplicitMediaRedactionUtils.tsx'; /* Metro dependency 4821 */
|
|
import * as ReferencedMessageStoreModule from '../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
|
|
import * as ObscuredMediaUtilsModule from './ObscuredMediaUtils.tsx'; /* Metro dependency 4838 */
|
|
import * as HarmTypeConfigurationModule from './HarmTypeConfiguration.tsx'; /* Metro dependency 4839 */
|
|
import * as ExplicitMediaRedactionModelsModule from './ExplicitMediaRedactionModels.tsx'; /* Metro dependency 4841 */
|
|
import * as ExplicitMediaManagerUtilsModule from './ExplicitMediaManagerUtils.tsx'; /* Metro dependency 4847 */
|
|
|
|
function _fun42104(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6, offset: 0x01130a0f, size: 638 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const createCompositeKey = function({channel_id, id}) {
|
|
return '' + channel_id + ':' + id;
|
|
};
|
|
const aggregateExplicitMediaCounts = function(a0) {
|
|
a0.forEach(_fun42125);
|
|
return {channelLookup: {}, messageLookup: {}};
|
|
};
|
|
const handleThreadsLoad = function({guildId, firstMessages}) {
|
|
return firstMessages != null && (!(SelectedGuildStore.getGuildId() !== guildId) && processMessagesFromAction(firstMessages,
|
|
|
|
{forceBatchScan: true}));
|
|
};
|
|
const handleChannelSelect = function({channelId}) {
|
|
return channelId != null && (!(channelId !== SelectedChannelStore.getChannelId()) && maybeScanMessagesForChannelId(channelId));
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_19 = {};
|
|
let value = AutomaticLifecycleManager;
|
|
value = _fun42168(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaManager.tsx');
|
|
exports.default = value;
|
|
exports.MESSAGE_SCAN_TIMEOUT = 3000;
|
|
exports.MAX_TIMEOUT_FOR_JITTER = 800;
|
|
function _isNativeReflectConstruct_42105() { // fn#42105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:342, offset: 0x01130c8d, 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_42105_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function resetManager() { // fn#42109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:607, offset: 0x01130d16, size: 52 bytes, params: 1, frame: 12
|
|
var object2;
|
|
const Object = global.Object;
|
|
Object.values(object2).forEach(function({timeout}) {
|
|
(0, global.clearTimeout)(timeout);
|
|
});
|
|
object2 = {};
|
|
}
|
|
|
|
function maybeCancelTimeout(a0, a1) { // fn#42111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:697, offset: 0x01130d64, size: 119 bytes, params: 3, frame: 18
|
|
var property;
|
|
var timeout;
|
|
if (a0.id != null) {
|
|
if (a0.channel_id == null) {
|
|
return false;
|
|
}
|
|
var compositeKey = createCompositeKey(a0);
|
|
if (env0_19[compositeKey] != null) {
|
|
property = env0_19[compositeKey];
|
|
timeout = property.timeout;
|
|
handleMediaScanCompleteReporting(a0, a1, property.setAt);
|
|
global.clearTimeout(timeout);
|
|
delete env0_19[compositeKey];
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
function handleMediaScanCompleteReporting(a0, a1, a2) { // fn#42112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:846, owner: maybeCancelTimeout.handleMediaScanCompleteReporting, offset: 0x01130ddb, size: 234 bytes, params: 4, frame: 22
|
|
var environment;
|
|
var r10;
|
|
var r9;
|
|
var object;
|
|
var value2;
|
|
var value3;
|
|
var moduleValue;
|
|
var trackExplicitMediaScanComplete;
|
|
var length;
|
|
const value = environment.__proto__;
|
|
const TimeoutCancelSource = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TimeoutCancelSource;
|
|
const UPDATE = TimeoutCancelSource.UPDATE;
|
|
if (a1 === UPDATE) {
|
|
r10 = a0.attachments ?? [];
|
|
r9 = a0.embeds ?? [];
|
|
value2 = r10.filter(_fun42113);
|
|
value3 = r9.filter(_fun42114);
|
|
moduleValue = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
trackExplicitMediaScanComplete = moduleValue.trackExplicitMediaScanComplete;
|
|
object = {};
|
|
object.messageId = a0.id;
|
|
object.channelId = a0.channel_id;
|
|
length = r10.length;
|
|
object.numOfAttachments = length;
|
|
length = r9.length;
|
|
object.numOfEmbeds = length;
|
|
length = value2.length;
|
|
object.numOfExplicitAttachments = length;
|
|
length = value3.length;
|
|
object.numOfExplicitEmbeds = length;
|
|
Reflect.apply(trackExplicitMediaScanComplete, moduleValue, [object]);
|
|
}
|
|
(require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).trackScanTiming(a2, a1);
|
|
function _fun42113(a0) { // fn#42113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1016, offset: 0x01130ec5, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const EXPLICIT = ContentHarmType.EXPLICIT;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Attachment = ObscuredMediaTypes.Attachment;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [EXPLICIT, {type: Attachment, media: a0}]);
|
|
}
|
|
|
|
function _fun42114(a0) { // fn#42114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1157, offset: 0x01130f2a, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const EXPLICIT = ContentHarmType.EXPLICIT;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Embed = ObscuredMediaTypes.Embed;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [EXPLICIT, {type: Embed, media: a0}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function withoutScheduledTimeout(a0) { // fn#42115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1718, offset: 0x01130f8f, size: 33 bytes, params: 2, frame: 12
|
|
return env0_19[createCompositeKey(a0)] == null;
|
|
}
|
|
|
|
function handleUnscannedMessages(a0, a1) { // fn#42116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1800, offset: 0x01130fb0, size: 278 bytes, params: 3, frame: 18
|
|
var r3;
|
|
var set;
|
|
var setTimeout;
|
|
let value = a1;
|
|
let r2 = value ?? ({});
|
|
const forceBatchScan = r2.forceBatchScan;
|
|
let r4 = forceBatchScan !== undefined && forceBatchScan;
|
|
const jitter = r2.jitter;
|
|
r2 = jitter !== undefined && jitter;
|
|
if (value == null) {
|
|
value = a0.filter(_fun42118);
|
|
value = value.filter(withoutScheduledTimeout);
|
|
r3 = value;
|
|
} else if (value.isMessageUpdate) {
|
|
value = a0.filter(_fun42117);
|
|
value = value.filter(withoutScheduledTimeout);
|
|
r3 = value;
|
|
} else {
|
|
value = a0.filter(_fun42118);
|
|
value = value.filter(withoutScheduledTimeout);
|
|
r3 = value;
|
|
}
|
|
r3.forEach(_fun42119);
|
|
if (!r4) {
|
|
set = new global.Set(r3.map(function(a0) {
|
|
return a0.channel_id;
|
|
}));
|
|
set = set.size > 1;
|
|
r4 = set;
|
|
}
|
|
if (r2) {
|
|
setTimeout = global.setTimeout;
|
|
value = global.Math.random();
|
|
value = 800 * value;
|
|
setTimeout(_fun42122, value);
|
|
} else {
|
|
sendForScanning(r3, r4);
|
|
}
|
|
function _fun42117(a0) { // fn#42117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1958, offset: 0x011310c6, size: 72 bytes, params: 2, frame: 14
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const isEligibleForScanning2 = (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).isEligibleForScanning(a0);
|
|
if (isEligibleForScanning2) {
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
value = value.hasUnscannedMedia(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = isEligibleForScanning2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun42118(a0) { // fn#42118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2070, offset: 0x0113110e, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return (ObscuredMediaUtilsModule).isEligibleForScanning(a0);
|
|
}
|
|
|
|
function _fun42119(a0) { // fn#42119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2152, offset: 0x01131137, size: 167 bytes, params: 2, frame: 19
|
|
var defaultImport;
|
|
var increment;
|
|
var object;
|
|
var binding;
|
|
const env0_0 = a0;
|
|
const compositeKey = createCompositeKey(a0);
|
|
if (env1_19[compositeKey] == null) {
|
|
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
|
increment = defaultImport.increment;
|
|
object = {};
|
|
object.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMEOUT_CREATE;
|
|
Reflect.apply(increment, defaultImport, [object]);
|
|
binding = env1_19;
|
|
object = {};
|
|
object.setAt = global.Date.now();
|
|
object.timeout = global.setTimeout(_fun42120, 3000);
|
|
binding[compositeKey] = object;
|
|
}
|
|
function _fun42120() { // fn#42120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2331, offset: 0x011311de, size: 245 bytes, params: 1, frame: 18
|
|
var messageStoreBinding;
|
|
var getMessage;
|
|
var channel_id;
|
|
var id;
|
|
var value2;
|
|
var unscannedMediaIds;
|
|
var dispatch;
|
|
const binding = env0_0;
|
|
let value = environment.__proto__.__proto__;
|
|
const maybeCancelTimeoutBinding = maybeCancelTimeout;
|
|
const TimeoutCancelSource = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TimeoutCancelSource;
|
|
const TIMEOUT = TimeoutCancelSource.TIMEOUT;
|
|
if (maybeCancelTimeoutBinding(binding, TIMEOUT)) {
|
|
messageStoreBinding = MessageStore;
|
|
getMessage = messageStoreBinding.getMessage;
|
|
channel_id = binding.channel_id;
|
|
id = binding.id;
|
|
value2 = Reflect.apply(getMessage, messageStoreBinding, [channel_id, id]);
|
|
if (value2 != null) {
|
|
unscannedMediaIds = (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).getUnscannedMediaIds(value2);
|
|
(require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).trackScanningTimedOut({channelId: binding.channel_id,
|
|
|
|
|
|
messageId: binding.id, attachmentIds: unscannedMediaIds.attachmentIds,
|
|
embedIds: unscannedMediaIds.embedIds});
|
|
}
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
dispatch = value.dispatch;
|
|
id = binding.id;
|
|
channel_id = binding.channel_id;
|
|
Reflect.apply(dispatch, value, [{type: 'MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT', messageId: id,
|
|
channelId: channel_id}]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun42122() { // fn#42122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2841, offset: 0x011312dd, size: 45 bytes, params: 1, frame: 13
|
|
sendForScanning(env0_0.filter(_fun42123), env0_1);
|
|
function _fun42123(a0) { // fn#42123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2862, offset: 0x0113130a, size: 33 bytes, params: 2, frame: 12
|
|
return env2_19[createCompositeKey(a0)] != null;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function aggregateExplicitMediaCounts(a0) { // fn#42124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:2961, offset: 0x0113132b, size: 46 bytes, params: 2, frame: 13
|
|
a0.forEach(_fun42125);
|
|
return {channelLookup: {}, messageLookup: {}};
|
|
function _fun42125(a0) { // fn#42125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:3034, offset: 0x01131359, size: 669 bytes, params: 2, frame: 20
|
|
if (env0_0[a0.channel_id] == null) {
|
|
env0_0[a0.channel_id] = {'numOfAttachments': 0, 'numOfAttachmentsPendingScan': 0, 'numOfEmbeds': 0,
|
|
'numOfEmbedsPendingScan': 0};
|
|
}
|
|
if (env0_1[a0.id] == null) {
|
|
env0_1[a0.id] = {'channelId': null, 'numOfAttachments': 0, 'numOfSelfHarmAttachments': 0,
|
|
'numOfGoreAttachments': 0,
|
|
'numOfExplicitAttachments': 0, 'numOfEmbeds': 0, 'numOfSelfHarmEmbeds': 0, 'numOfGoreEmbeds': 0,
|
|
'numOfExplicitEmbeds': 0, channelId: a0.channel_id};
|
|
}
|
|
let attachments = a0.attachments;
|
|
const value2 = undefined;
|
|
const length = attachments == null ? value2 : attachments.length;
|
|
const value3 = 0;
|
|
const r8 = length ?? value3;
|
|
let embeds = a0.embeds;
|
|
const r7 = (embeds == null ? value2 : embeds.length) ?? value3;
|
|
const {attachmentIds,
|
|
embedIds} = (ObscuredMediaUtilsModule).getUnscannedMediaIds(a0);
|
|
let property = env0_0[a0.channel_id];
|
|
property.numOfAttachments = property.numOfAttachments + r8;
|
|
property.numOfEmbeds = property.numOfEmbeds + r7;
|
|
property.numOfAttachmentsPendingScan = property.numOfAttachmentsPendingScan + attachmentIds.length;
|
|
property.numOfEmbedsPendingScan = property.numOfEmbedsPendingScan + embedIds.length;
|
|
property = env0_1[a0.id];
|
|
property.numOfAttachments = property.numOfAttachments + r8;
|
|
property.numOfEmbeds = property.numOfEmbeds + r7;
|
|
attachments = a0.attachments;
|
|
property.numOfExplicitAttachments = (attachments == null ? value2 : attachments.filter(_fun42126).length) ?? value3;
|
|
embeds = a0.embeds;
|
|
property.numOfExplicitEmbeds = (embeds == null ? value2 : embeds.filter(_fun42127).length) ?? value3;
|
|
attachments = a0.attachments;
|
|
property.numOfGoreAttachments = (attachments == null ? value2 : attachments.filter(_fun42128).length) ?? value3;
|
|
embeds = a0.embeds;
|
|
property.numOfGoreEmbeds = (embeds == null ? value2 : embeds.filter(_fun42129).length) ?? value3;
|
|
attachments = a0.attachments;
|
|
property.numOfSelfHarmAttachments = (attachments == null ? value2 : attachments.filter(_fun42130).length) ?? value3;
|
|
embeds = a0.embeds;
|
|
property.numOfSelfHarmEmbeds = (embeds == null ? value2 : embeds.filter(_fun42131).length) ?? value3;
|
|
return value2;
|
|
function _fun42126(a0) { // fn#42126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:3866, offset: 0x01130ec5, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const EXPLICIT = ContentHarmType.EXPLICIT;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Attachment = ObscuredMediaTypes.Attachment;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [EXPLICIT, {type: Attachment, media: a0}]);
|
|
}
|
|
|
|
function _fun42127(a0) { // fn#42127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:4074, offset: 0x01130f2a, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const EXPLICIT = ContentHarmType.EXPLICIT;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Embed = ObscuredMediaTypes.Embed;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [EXPLICIT, {type: Embed, media: a0}]);
|
|
}
|
|
|
|
function _fun42128(a0) { // fn#42128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:4283, offset: 0x011315f6, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const GORE = ContentHarmType.GORE;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Attachment = ObscuredMediaTypes.Attachment;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [GORE, {type: Attachment, media: a0}]);
|
|
}
|
|
|
|
function _fun42129(a0) { // fn#42129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:4483, offset: 0x0113165b, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const GORE = ContentHarmType.GORE;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Embed = ObscuredMediaTypes.Embed;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [GORE, {type: Embed, media: a0}]);
|
|
}
|
|
|
|
function _fun42130(a0) { // fn#42130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:4692, offset: 0x011316c0, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const SELF_HARM = ContentHarmType.SELF_HARM;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Attachment = ObscuredMediaTypes.Attachment;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [SELF_HARM, {type: Attachment, media: a0}]);
|
|
}
|
|
|
|
function _fun42131(a0) { // fn#42131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:4901, offset: 0x01131725, size: 101 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
const isMediaFlaggedForHarmType = value.isMediaFlaggedForHarmType;
|
|
const ContentHarmType = (HarmTypeConfigurationModule).ContentHarmType;
|
|
const SELF_HARM = ContentHarmType.SELF_HARM;
|
|
const ObscuredMediaTypes = (ExplicitMediaRedactionModelsModule).ObscuredMediaTypes;
|
|
const Embed = ObscuredMediaTypes.Embed;
|
|
return Reflect.apply(isMediaFlaggedForHarmType, value, [SELF_HARM, {type: Embed, media: a0}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function processMessagesFromAction(a0, a1) { // fn#42132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5075, offset: 0x0113178a, size: 150 bytes, params: 3, frame: 20
|
|
var r0;
|
|
const {messagesPendingScan, attributesByChannelId, attributesByMessageId} = getScanningAttributesForMessages(a0);
|
|
(SnowflakeUtils).entries(attributesByChannelId).forEach(_fun42139);
|
|
(SnowflakeUtils).entries(attributesByMessageId).forEach(_fun42140);
|
|
const value4 = messagesPendingScan.length > 0;
|
|
if (value4) {
|
|
handleUnscannedMessages(messagesPendingScan, a1);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
return r0;
|
|
function getScanningAttributesForMessages(a0) { // fn#42133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5121, owner: processMessagesFromAction.getScanningAttributesForMessages, offset: 0x01131820, size: 184 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var r5;
|
|
var items2;
|
|
let value = a0.filter(_fun42134);
|
|
const value3 = a0.map(_fun42135).filter(function(a0) {
|
|
return a0 != null;
|
|
});
|
|
if (value3.length > 0) {
|
|
items2 = [];
|
|
arraySpread(items2, value3, arraySpread(items2, value, 0, value), value);
|
|
r5 = items2;
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
const value4 = (importDefault(4848) /* metro dependency 4848 */)(r5, function(a0, a1) {
|
|
return a0.id === a1.id && a0.channel_id === a1.channel_id;
|
|
});
|
|
const value5 = value4.filter(_fun42138);
|
|
value = aggregateExplicitMediaCounts(value4);
|
|
return {messagesPendingScan: value5, attributesByMessageId: value.messageLookup,
|
|
attributesByChannelId: value.channelLookup};
|
|
function _fun42134(a0) { // fn#42134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5182, offset: 0x011318d8, size: 76 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4847) /* metro dependency 4847: ExplicitMediaManagerUtils */;
|
|
value = value.hasAttachmentsEmbedsComponentsOrSnapshots(a0);
|
|
return value && (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).getEnabledHarmTypesForMessage(a0) !== 0;
|
|
}
|
|
|
|
function _fun42135(a0) { // fn#42135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5318, offset: 0x01131924, size: 130 bytes, params: 2, frame: 14
|
|
var referenced_message;
|
|
var value;
|
|
var moduleValue;
|
|
var hasAttachmentsEmbedsComponentsOrSnapshots;
|
|
if (a0 != null) {
|
|
if ('referenced_message' in a0) {
|
|
referenced_message = a0.referenced_message;
|
|
if (referenced_message == null) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
moduleValue = require(4847) /* metro dependency 4847: ExplicitMediaManagerUtils */;
|
|
hasAttachmentsEmbedsComponentsOrSnapshots = moduleValue.hasAttachmentsEmbedsComponentsOrSnapshots;
|
|
referenced_message = a0.referenced_message;
|
|
if (Reflect.apply(hasAttachmentsEmbedsComponentsOrSnapshots, moduleValue, [referenced_message])) {
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
value = value.getEnabledHarmTypesForMessage(a0.referenced_message);
|
|
if (value !== 0) {
|
|
return a0.referenced_message;
|
|
}
|
|
return undefined;
|
|
}
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun42138(a0) { // fn#42138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5704, offset: 0x011319cd, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (ObscuredMediaUtilsModule).hasUnscannedMedia(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun42139(a0) { // fn#42139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:5995, offset: 0x011319f6, size: 149 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r2;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
(ExplicitMediaRedactionUtilsModule).trackExplicitMediaRedactableMessagedLoaded({channelId: r5,
|
|
numOfAttachments: r4.numOfAttachments, numOfAttachmentsPendingScan: r4.numOfAttachmentsPendingScan,
|
|
numOfEmbeds: r4.numOfEmbeds, numOfEmbedsPendingScan: r4.numOfEmbedsPendingScan});
|
|
return value;
|
|
}
|
|
|
|
function _fun42140(a0) { // fn#42140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6272, offset: 0x01131a8b, size: 202 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r2;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
(ExplicitMediaRedactionUtilsModule).trackRedactableMessageLoaded({messageId: r5,
|
|
channelId: r4.channelId, numOfAttachments: r4.numOfAttachments, numOfGoreAttachments: r4.numOfGoreAttachments,
|
|
numOfExplicitAttachments: r4.numOfExplicitAttachments, numOfSelfHarmAttachments: r4.numOfSelfHarmAttachments,
|
|
numOfEmbeds: r4.numOfEmbeds, numOfGoreEmbeds: r4.numOfGoreEmbeds, numOfExplicitEmbeds: r4.numOfExplicitEmbeds,
|
|
numOfSelfHarmEmbeds: r4.numOfSelfHarmEmbeds});
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function processChannelMessagesFromAction(a0) { // fn#42141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6734, offset: 0x01131b55, size: 146 bytes, params: 2, frame: 19
|
|
var r0;
|
|
const {messagesPendingScan, attributesByChannelId,
|
|
attributesByMessageId} = getScanningAttributesForChannelMessages(a0);
|
|
(SnowflakeUtils).entries(attributesByChannelId).forEach(_fun42148);
|
|
(SnowflakeUtils).entries(attributesByMessageId).forEach(_fun42149);
|
|
const value4 = messagesPendingScan.length > 0;
|
|
if (value4) {
|
|
handleUnscannedMessages(messagesPendingScan);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
return r0;
|
|
function getScanningAttributesForChannelMessages(a0) { // fn#42142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6785, owner: processChannelMessagesFromAction.getScanningAttributesForChannelMessages, offset: 0x01131be7, size: 184 bytes, params: 2, frame: 16
|
|
var environment;
|
|
var r5;
|
|
var items2;
|
|
let value = a0.filter(_fun42143);
|
|
const value3 = a0.map(_fun42144).filter(function(a0) {
|
|
return a0 != null;
|
|
});
|
|
if (value3.length > 0) {
|
|
items2 = [];
|
|
arraySpread(items2, value3, arraySpread(items2, value, 0, value), value);
|
|
r5 = items2;
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
const value4 = (importDefault(4848) /* metro dependency 4848 */)(r5, function(a0, a1) {
|
|
return a0.id === a1.id && a0.channel_id === a1.channel_id;
|
|
});
|
|
const value5 = value4.filter(_fun42147);
|
|
value = aggregateExplicitMediaCounts(value4);
|
|
return {messagesPendingScan: value5, attributesByChannelId: value.channelLookup,
|
|
attributesByMessageId: value.messageLookup};
|
|
function _fun42143(a0) { // fn#42143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6853, offset: 0x01131c9f, size: 81 bytes, params: 2, frame: 14
|
|
var r0;
|
|
let value = environment.__proto__.__proto__;
|
|
const hasAttachmentsEmbedsComponentsOrSnapshots2 = (ExplicitMediaManagerUtilsModule).hasAttachmentsEmbedsComponentsOrSnapshots(a0);
|
|
if (hasAttachmentsEmbedsComponentsOrSnapshots2) {
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
value = value.getEnabledHarmTypesForMessage(a0);
|
|
value = value !== 0;
|
|
r0 = value;
|
|
} else {
|
|
r0 = hasAttachmentsEmbedsComponentsOrSnapshots2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun42144(a0) { // fn#42144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:6968, offset: 0x01131cf0, size: 189 bytes, params: 2, frame: 14
|
|
var messageReference;
|
|
var referencedMessageStoreBinding;
|
|
var getMessageByReference;
|
|
var value2;
|
|
var message;
|
|
var moduleValue;
|
|
var hasAttachmentsEmbedsComponentsOrSnapshots;
|
|
let value = environment.__proto__.__proto__;
|
|
if (MessageTypesWithLazyLoadedReferences.has(a0.type)) {
|
|
messageReference = a0.messageReference;
|
|
if (messageReference == null) {
|
|
return undefined;
|
|
}
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
getMessageByReference = referencedMessageStoreBinding.getMessageByReference;
|
|
messageReference = a0.messageReference;
|
|
value2 = Reflect.apply(getMessageByReference, referencedMessageStoreBinding, [messageReference]);
|
|
if (value2.state !== ReferencedMessageState.LOADED) {
|
|
return undefined;
|
|
}
|
|
message = value2.message;
|
|
if (message == null) {
|
|
return undefined;
|
|
}
|
|
moduleValue = require(4847) /* metro dependency 4847: ExplicitMediaManagerUtils */;
|
|
hasAttachmentsEmbedsComponentsOrSnapshots = moduleValue.hasAttachmentsEmbedsComponentsOrSnapshots;
|
|
message = value2.message;
|
|
if (Reflect.apply(hasAttachmentsEmbedsComponentsOrSnapshots, moduleValue, [message])) {
|
|
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
value = value.getEnabledHarmTypesForMessage(value2.message);
|
|
if (value !== 0) {
|
|
return value2.message;
|
|
}
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun42147(a0) { // fn#42147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:7390, offset: 0x011319cd, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (ObscuredMediaUtilsModule).hasUnscannedMedia(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun42148(a0) { // fn#42148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:7681, offset: 0x011319f6, size: 149 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r2;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
(ExplicitMediaRedactionUtilsModule).trackExplicitMediaRedactableMessagedLoaded({channelId: r5,
|
|
numOfAttachments: r4.numOfAttachments, numOfAttachmentsPendingScan: r4.numOfAttachmentsPendingScan,
|
|
numOfEmbeds: r4.numOfEmbeds, numOfEmbedsPendingScan: r4.numOfEmbedsPendingScan});
|
|
return value;
|
|
}
|
|
|
|
function _fun42149(a0) { // fn#42149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:7958, offset: 0x01131dad, size: 202 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r2;
|
|
var r4;
|
|
var item3;
|
|
var value3;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r5 = value2 ? value : item;
|
|
if (value2) {
|
|
r1 = item2;
|
|
r2 = value2;
|
|
r4 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = value;
|
|
} else {
|
|
r1 = item3;
|
|
r2 = value3;
|
|
r4 = item;
|
|
}
|
|
}
|
|
if (!r2) {
|
|
r1.return();
|
|
}
|
|
(ExplicitMediaRedactionUtilsModule).trackRedactableMessageLoaded({messageId: r5,
|
|
channelId: r4.channelId, numOfAttachments: r4.numOfAttachments, numOfGoreAttachments: r4.numOfGoreAttachments,
|
|
numOfSelfHarmAttachments: r4.numOfSelfHarmAttachments, numOfExplicitAttachments: r4.numOfExplicitAttachments,
|
|
numOfEmbeds: r4.numOfEmbeds, numOfGoreEmbeds: r4.numOfGoreEmbeds, numOfExplicitEmbeds: r4.numOfExplicitEmbeds,
|
|
numOfSelfHarmEmbeds: r4.numOfSelfHarmEmbeds});
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function handleMessageUpdate({message}) { // fn#42150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:8418, offset: 0x01131e77, size: 601 bytes, params: 2, frame: 20
|
|
var length;
|
|
var r6;
|
|
var r3;
|
|
var attachments;
|
|
var moduleValue3;
|
|
var moduleValue4;
|
|
var hasUnscannedMedia;
|
|
var messageStoreBinding;
|
|
var referencedMessageStoreBinding;
|
|
var value5;
|
|
var value6;
|
|
var moduleValue5;
|
|
var moduleValue6;
|
|
const TimeoutCancelSource = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TimeoutCancelSource;
|
|
var channelId;
|
|
var currentSidebarChannelId;
|
|
var value9;
|
|
let channel_id = message.channel_id;
|
|
if (channel_id != null) {
|
|
if (message.id == null) {
|
|
return false;
|
|
}
|
|
var value;
|
|
var value2 = undefined;
|
|
var moduleValue = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
var getChannelIdAndAuthorIdFromMessage = moduleValue.getChannelIdAndAuthorIdFromMessage;
|
|
var authorId = Reflect.apply(getChannelIdAndAuthorIdFromMessage, moduleValue, [message]).authorId;
|
|
var authenticationStoreBinding = AuthenticationStore;
|
|
var getId = authenticationStoreBinding.getId;
|
|
if (authorId === Reflect.apply(getId, authenticationStoreBinding, [])) {
|
|
return false;
|
|
}
|
|
var embeds = message.embeds;
|
|
if (embeds != null) {
|
|
embeds = message.embeds;
|
|
length = embeds == null ? value2 : embeds.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
attachments = message.attachments;
|
|
length = attachments == null ? value2 : attachments.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
moduleValue3 = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
if (moduleValue3.hasMessageSnapshotsWithAttachmentsOrEmbeds(message)) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
return false;
|
|
}
|
|
attachments = message.attachments;
|
|
if (attachments != null) {
|
|
embeds = message.embeds;
|
|
length = embeds == null ? value2 : embeds.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
attachments = message.attachments;
|
|
length = attachments == null ? value2 : attachments.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
moduleValue3 = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
if (moduleValue3.hasMessageSnapshotsWithAttachmentsOrEmbeds(message)) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
return false;
|
|
}
|
|
var moduleValue2 = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
if (moduleValue2.hasMessageSnapshotsWithAttachmentsOrEmbeds(message)) {
|
|
embeds = message.embeds;
|
|
length = embeds == null ? value2 : embeds.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
attachments = message.attachments;
|
|
length = attachments == null ? value2 : attachments.length;
|
|
if (length !== 0) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
moduleValue3 = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
|
|
if (moduleValue3.hasMessageSnapshotsWithAttachmentsOrEmbeds(message)) {
|
|
moduleValue4 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue4.hasUnscannedMedia;
|
|
if (!Reflect.apply(hasUnscannedMedia, moduleValue4, [message])) {
|
|
messageStoreBinding = MessageStore;
|
|
r6 = messageStoreBinding.getMessage(message.channel_id,
|
|
message.id) ?? ExplicitMediaSearchStore.getMessage(message.id, message.channel_id);
|
|
if (r6 == null) {
|
|
referencedMessageStoreBinding = ReferencedMessageStore;
|
|
value5 = referencedMessageStoreBinding.getMessage(message.channel_id, message.id);
|
|
message = value5 == null ? value2 : value5.message;
|
|
r6 = message;
|
|
}
|
|
value6 = r6 == null;
|
|
if (value6) {
|
|
r3 = value6;
|
|
} else {
|
|
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
|
hasUnscannedMedia = moduleValue5.hasUnscannedMedia;
|
|
moduleValue6 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
|
r3 = Reflect.apply(hasUnscannedMedia, moduleValue5, [moduleValue6.updateMessageRecord(r6,
|
|
message)]);
|
|
}
|
|
if (!r3) {
|
|
maybeCancelTimeout(r6, TimeoutCancelSource.UPDATE);
|
|
}
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId);
|
|
channel_id = message.channel_id;
|
|
if (channel_id === channelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
channel_id = message.channel_id;
|
|
if (channel_id === currentSidebarChannelId) {
|
|
messageStoreBinding = MessageStore;
|
|
value9 = messageStoreBinding.getMessage(message.channel_id, message.id);
|
|
return value9 != null && processMessagesFromAction([value9], {isMessageUpdate: true});
|
|
}
|
|
return false;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleMessageCreate({channelId, message, optimistic, isPushNotification}) { // fn#42151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:9379, offset: 0x011320d0, size: 274 bytes, params: 2, frame: 18
|
|
if (optimistic) {
|
|
return false;
|
|
}
|
|
if (isPushNotification) {
|
|
return false;
|
|
}
|
|
if (channelId == null) {
|
|
return false;
|
|
}
|
|
const getChannelIdAndAuthorIdFromMessage = ObscuredMediaUtilsModule.getChannelIdAndAuthorIdFromMessage;
|
|
const authorId = Reflect.apply(getChannelIdAndAuthorIdFromMessage, ObscuredMediaUtilsModule, [message]).authorId;
|
|
const authenticationStoreBinding = AuthenticationStore;
|
|
const getId = authenticationStoreBinding.getId;
|
|
if (authorId === Reflect.apply(getId, authenticationStoreBinding, [])) {
|
|
return false;
|
|
}
|
|
const channelId2 = SelectedChannelStore.getChannelId();
|
|
const currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId2);
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
if (channelId !== channelId2) {
|
|
if (channelId !== currentSidebarChannelId) {
|
|
return false;
|
|
}
|
|
}
|
|
let r5 = channel?.isPrivate();
|
|
let r4 = r5 == null || r5;
|
|
r5 = channel?.memberCount == null || channel?.memberCount > 100;
|
|
const processMessagesFromActionBinding = processMessagesFromAction;
|
|
r4 = r4 && r5;
|
|
return processMessagesFromActionBinding([message], {jitter: r4});
|
|
}
|
|
|
|
function handleMessagesLoad({channelId, messages}) { // fn#42152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:9843, offset: 0x011321e2, size: 87 bytes, params: 2, frame: 14
|
|
if (channelId == null) {
|
|
return false;
|
|
}
|
|
if (messages == null) {
|
|
return false;
|
|
}
|
|
const channelId2 = SelectedChannelStore.getChannelId();
|
|
return (channelId === channelId2 || channelId === ChannelSectionStore.getCurrentSidebarChannelId(channelId2)) && processMessagesFromAction(messages);
|
|
}
|
|
|
|
function handleSearchMessagesSuccess({data}) { // fn#42153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10034, offset: 0x01132239, size: 37 bytes, params: 2, frame: 12
|
|
data.forEach(_fun42154);
|
|
return false;
|
|
function _fun42154({messages}) { // fn#42154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10108, offset: 0x0113225e, size: 92 bytes, params: 2, frame: 15
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const value2 = (Module04857)(messages);
|
|
const processMessagesFromActionBinding = processMessagesFromAction;
|
|
value = importDefault(4848) /* metro dependency 4848 */;
|
|
value = processMessagesFromActionBinding(value(value2, function(a0, a1) {
|
|
return a0.id === a1.id && a0.channel_id === a1.channel_id;
|
|
}));
|
|
const r2 = value || env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function handleLoadPinnedMessages_42156({pins}) { // fn#42156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10246, offset: 0x011322ba, size: 42 bytes, params: 2, frame: 12
|
|
return processMessagesFromAction(pins.map(function(a0) {
|
|
return a0.message;
|
|
}));
|
|
}
|
|
|
|
function handleForumPostsLoad({guildId, threads}) { // fn#42158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10350, offset: 0x011322e4, size: 114 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var selectedGuildStoreBinding;
|
|
var value2;
|
|
var processMessagesFromActionBinding;
|
|
let value = threads != null;
|
|
if (value) {
|
|
selectedGuildStoreBinding = SelectedGuildStore;
|
|
value2 = selectedGuildStoreBinding.getGuildId() === guildId;
|
|
if (value2) {
|
|
processMessagesFromActionBinding = processMessagesFromAction;
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.keys(threads);
|
|
value = processMessagesFromActionBinding(value.map(function(a0) {
|
|
return threads[a0].first_message;
|
|
}));
|
|
r1 = value;
|
|
} else {
|
|
r1 = value2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function handleSidebarViewChannel({channelId}) { // fn#42161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10668, offset: 0x011323b8, size: 33 bytes, params: 2, frame: 12
|
|
return channelId != null && maybeScanMessagesForChannelId(channelId);
|
|
}
|
|
|
|
function handleUserSettingsUpdate(a0) { // fn#42163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:10886, offset: 0x01132415, size: 80 bytes, params: 2, frame: 12
|
|
var channelId;
|
|
if (a0.local) {
|
|
if (a0.settings.type !== UserSettingsTypes.PRELOADED_USER_SETTINGS) {
|
|
return false;
|
|
}
|
|
channelId = SelectedChannelStore.getChannelId();
|
|
return channelId != null && maybeScanMessagesForChannelId(channelId);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function handleVoiceChannelChatOpen({channelId, chatOpen}) { // fn#42164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:11065, offset: 0x01132465, size: 39 bytes, params: 2, frame: 12
|
|
return chatOpen ? maybeScanMessagesForChannelId(channelId) : !!chatOpen;
|
|
}
|
|
|
|
function maybeScanMessagesForChannelId(a0) { // fn#42165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:11171, offset: 0x0113248c, size: 48 bytes, params: 2, frame: 12
|
|
const messages = MessageStore.getMessages(a0);
|
|
return messages.length !== 0 && processChannelMessagesFromAction(messages);
|
|
}
|
|
|
|
function sendForScanning(a0, a1) { // fn#42166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:1576, offset: 0x011324bc, size: 100 bytes, params: 3, frame: 15
|
|
var value;
|
|
if (a0.length !== 0) {
|
|
value = require(4846) /* metro dependency 4846: ExplicitMediaRedactionActionCreators */;
|
|
if (a1) {
|
|
value.sendMultiChannelMessagesForScanning(a0);
|
|
} else {
|
|
value.sendMessagesForScanning(a0[0].channel_id, a0.map(function(a0) {
|
|
return a0.id;
|
|
}));
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun42168(a0) { // fn#42168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:11303, offset: 0x01132520, size: 40 bytes, params: 2, frame: 14
|
|
const ExplicitMediaManager2 = ExplicitMediaManager;
|
|
Inherits(ExplicitMediaManager2, a0);
|
|
return CreateClass(ExplicitMediaManager2);
|
|
function ExplicitMediaManager(a0) { // fn#42169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5010:11315, offset: 0x01132548, size: 252 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, ExplicitMediaManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(ExplicitMediaManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_42105()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
const handleThreadsLoadBinding = handleThreadsLoad;
|
|
const handleSearchMessagesSuccessBinding = handleSearchMessagesSuccess;
|
|
value.actions = {LOAD_MESSAGES_SUCCESS: handleMessagesLoad, LOAD_FORUM_POSTS: handleForumPostsLoad,
|
|
LOAD_THREADS_SUCCESS: handleThreadsLoadBinding, LOAD_ARCHIVED_THREADS_SUCCESS: handleThreadsLoadBinding,
|
|
SIDEBAR_VIEW_CHANNEL: handleSidebarViewChannel, MESSAGE_CREATE: handleMessageCreate,
|
|
MESSAGE_UPDATE: handleMessageUpdate, LOGOUT: resetManager,
|
|
SEARCH_MESSAGES_SUCCESS: handleSearchMessagesSuccessBinding,
|
|
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: handleSearchMessagesSuccessBinding, CHANNEL_SELECT: handleChannelSelect,
|
|
LOAD_PINNED_MESSAGES_SUCCESS: handleLoadPinnedMessages_42156,
|
|
USER_SETTINGS_PROTO_UPDATE: handleUserSettingsUpdate, CHANNEL_RTC_UPDATE_CHAT_OPEN: handleVoiceChannelChatOpen};
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun42104, 4832, [7, 6, 15, 17, 18, 4833, 1226, 4791, 1379, 4814, 1934, 3969, 4837, 661, 670, 4821, 4838,
|
|
4839, 4841, 694, 4846, 4826, 4831, 4847, 4848, 21, 4625, 4857, 4860,
|
|
2]) /* metro module 4832, dependencies: [7, 6, 15, 17, 18, 4833, 1226, 4791, 1379, 4814, 1934, 3969, 4837, 661, 670, 4821, 4838, 4839, 4841, 694, 4846, 4826, 4831, 4847, 4848, 21, 4625, 4857, 4860, 2] */;
|