Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,41 @@
|
||||
/* Metro module 10541; source: modules/applications/message_embed/native/createActivityMessageEmbed.tsx; dependencies: [10536, 9468, 2] */
|
||||
function _fun81307(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10727:6, offset: 0x01ec88d7, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/createActivityMessageEmbed.tsx');
|
||||
exports.createActivityMessageEmbed = createActivityMessageEmbed;
|
||||
}
|
||||
|
||||
function createActivityMessageEmbed({theme, embedUrl, message, app, params}) { // fn#81308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10727:227, offset: 0x01ec8937, size: 272 bytes, params: 2, frame: 19
|
||||
var r2;
|
||||
const createAppMessageEmbedModule = require(10536) /* metro dependency 10536: createAppMessageEmbed */;
|
||||
const createAppMessageEmbed = createAppMessageEmbedModule.createAppMessageEmbed;
|
||||
let object2 = {theme: theme, embedUrl: embedUrl, message: message, app: app};
|
||||
const appMessageEmbed = Reflect.apply(createAppMessageEmbed, createAppMessageEmbedModule, [object2]);
|
||||
if (appMessageEmbed == null) {
|
||||
return null;
|
||||
}
|
||||
const linkId = params.linkId;
|
||||
if (linkId == null) {
|
||||
return appMessageEmbed;
|
||||
}
|
||||
let value = require(9468) /* metro dependency 9468: CustomActivityLinkUtils */;
|
||||
value = value.getOrFetchCustomActivityLink(app.id, linkId);
|
||||
if (value == null) {
|
||||
r2 = null;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, appMessageEmbed, theme);
|
||||
object2['title'] = app.name;
|
||||
object2['header'] = value.title;
|
||||
object2['info'] = value.description;
|
||||
object2['bannerRatio'] = 'bot';
|
||||
value = value.getAssetURL();
|
||||
object2['staticBannerSrc'] = value ?? null;
|
||||
object2['tagline'] = null;
|
||||
r2 = object2;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/* Metro module 10536; source: modules/applications/message_embed/native/createAppMessageEmbed.tsx; dependencies: [57, 1878, 6874, 4234, 1483, 9859, 6772, 10537, 8189, 1244, 10538, 8046, 6873, 8045, 9466, 10539, 1423, 1471, 10540, 6789, 9527, 5068, 8087, 4015, 1583, 8870, 6797, 3856, 1360, 2] */
|
||||
function _fun81290(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:6, offset: 0x01ec75aa, size: 280 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
|
||||
const env0_6 = (require(6874) /* metro dependency 6874: ApplicationAssetsStore */).FetchState;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const env0_8 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
|
||||
const env0_9 = (require(9859) /* metro dependency 9859: CodedLinksConstants */).CodedLinkExtendedType;
|
||||
const env0_10 = ['embedded_cover'];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/createAppMessageEmbed.tsx');
|
||||
exports.getAppLinkGateResult = getAppLinkGateResult;
|
||||
exports.createAppMessageEmbed = createAppMessageEmbed;
|
||||
exports.handleTapAppMessageEmbed = handleTapAppMessageEmbed;
|
||||
}
|
||||
|
||||
function createBlockedAppMessageEmbed({theme, message, visibility}) { // fn#81291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:241, offset: 0x01ec76c2, size: 478 bytes, params: 2, frame: 19
|
||||
var r9;
|
||||
var r4;
|
||||
const intl = require(dependencyMap[9]).intl;
|
||||
const t = require(dependencyMap[9]).t;
|
||||
const baseColors = importDefault(dependencyMap[8])(theme).baseColors;
|
||||
const ApplicationEmbedVisibility = require(dependencyMap[7]).ApplicationEmbedVisibility;
|
||||
const BLOCK_UNDERAGE = ApplicationEmbedVisibility.BLOCK_UNDERAGE;
|
||||
if (visibility === BLOCK_UNDERAGE) {
|
||||
r4 = intl.string(t.LPOzxB);
|
||||
r9 = dependencyMap;
|
||||
} else {
|
||||
r4 = intl.string(t.NIZyKq);
|
||||
}
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, baseColors, r9);
|
||||
const AppMessageEmbedDisplayType = require(dependencyMap[10]).AppMessageEmbedDisplayType;
|
||||
const BLOCKED = AppMessageEmbedDisplayType.BLOCKED;
|
||||
object2['displayType'] = BLOCKED;
|
||||
object2['appId'] = '';
|
||||
object2['messageId'] = message.id;
|
||||
object2['title'] = null;
|
||||
object2['header'] = intl.string(t.bZBN64);
|
||||
object2['info'] = r4;
|
||||
object2['tagline'] = null;
|
||||
object2['iconSrc'] = null;
|
||||
object2['staticBannerSrc'] = null;
|
||||
object2['bannerRatio'] = 'bot';
|
||||
object2['actions'] = [];
|
||||
object2['embedUrl'] = null;
|
||||
const APP_MESSAGE_EMBED = CodedLinkExtendedType.APP_MESSAGE_EMBED;
|
||||
object2['extendedType'] = APP_MESSAGE_EMBED;
|
||||
object2['gradientColors'] = [];
|
||||
object2['type'] = null;
|
||||
object2['headerText'] = null;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getAppLinkGateResult({appId, channel, message, theme}) { // fn#81292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:931, offset: 0x01ec78a0, size: 274 bytes, params: 2, frame: 24
|
||||
var r1;
|
||||
var object2;
|
||||
const application = ApplicationStore.getApplication(appId);
|
||||
if (application == null) {
|
||||
if (ApplicationStore.isFetchingApplication(appId) === false) {
|
||||
(require(6772) /* metro dependency 6772: ApplicationActionCreators */).fetchApplication(appId);
|
||||
}
|
||||
return {state: 'unavailable'};
|
||||
}
|
||||
const applicationEmbedVisibility = (require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */).getApplicationEmbedVisibility(application.contentClassification,
|
||||
UserStore.getCurrentUser()?.nsfwAllowed, channel);
|
||||
const ApplicationEmbedVisibility = (require(10537) /* metro dependency 10537: getApplicationEmbedVisibility */).ApplicationEmbedVisibility;
|
||||
const DISPLAY = ApplicationEmbedVisibility.DISPLAY;
|
||||
if (applicationEmbedVisibility !== DISPLAY) {
|
||||
object2 = {state: 'blocked'};
|
||||
object2.model = createBlockedAppMessageEmbed({theme: theme, message: message,
|
||||
visibility: applicationEmbedVisibility});
|
||||
r1 = object2;
|
||||
} else {
|
||||
r1 = {state: 'display', app: application};
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function createAppMessageEmbed({theme, embedUrl, message, app}) { // fn#81293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:1443, offset: 0x01ec79b2, size: 1428 bytes, params: 2, frame: 34
|
||||
var r10;
|
||||
var r9;
|
||||
var r6;
|
||||
var r14;
|
||||
var r1;
|
||||
var applicationAssetFetchState;
|
||||
var value4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items;
|
||||
var moduleValue2;
|
||||
var playInContext;
|
||||
var instanceId;
|
||||
var isCurrentlyInInstance;
|
||||
var value11;
|
||||
var id2;
|
||||
var bot2;
|
||||
var moduleValue4;
|
||||
var assetIds;
|
||||
var property;
|
||||
var userBannerURL;
|
||||
var appGradientColors;
|
||||
var object2;
|
||||
const AppMessageEmbedDisplayType = (require(10538) /* metro dependency 10538: CodedLinksTypes */).AppMessageEmbedDisplayType;
|
||||
const baseColors = (importDefault(8189) /* metro dependency 8189: getEmbedThemeColors */)(theme).baseColors;
|
||||
const channel_id = message.channel_id;
|
||||
let id = app.id;
|
||||
const name = app.name;
|
||||
const bot = app.bot;
|
||||
const tags = app.tags;
|
||||
const maxParticipants = app.maxParticipants;
|
||||
const icon = app.icon;
|
||||
const appLauncherUtilsModule = require(8046) /* metro dependency 8046: AppLauncherUtils */;
|
||||
const isEmbeddedApp2 = appLauncherUtilsModule.isEmbeddedApp(app);
|
||||
if (isEmbeddedApp2) {
|
||||
applicationAssetFetchState = ApplicationAssetsStore.getApplicationAssetFetchState(id);
|
||||
if (applicationAssetFetchState === FetchState.NOT_FETCHED) {
|
||||
(require(6873) /* metro dependency 6873: ApplicationAssetUtils */).fetchAssetIds(id, env0_10);
|
||||
return null;
|
||||
}
|
||||
if (applicationAssetFetchState === FetchState.FETCHING) {
|
||||
return null;
|
||||
}
|
||||
value4 = null;
|
||||
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
|
||||
|
||||
{count: maxParticipants}) : intl.string(t.RjceQU);
|
||||
items = [];
|
||||
if (isEmbeddedApp2) {
|
||||
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
|
||||
if (moduleValue2.canLaunchFrame(app)) {
|
||||
items.push({id: 'play_frame', label: intl.string(t.RscU7I)});
|
||||
} else {
|
||||
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
|
||||
channel_id);
|
||||
instanceId = playInContext.instanceId;
|
||||
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
|
||||
if (playInContext.canLaunchInChannel) {
|
||||
items.push({id: 'play_in_channel',
|
||||
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
|
||||
|
||||
|
||||
|
||||
|
||||
disabled: isCurrentlyInInstance});
|
||||
} else {
|
||||
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
|
||||
}
|
||||
}
|
||||
}
|
||||
value11 = tags.join(' ∙ ');
|
||||
id2 = app.id;
|
||||
bot2 = app.bot;
|
||||
moduleValue4 = appLauncherUtilsModule;
|
||||
if (moduleValue4.isEmbeddedApp(app)) {
|
||||
assetIds = (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetIds(id2, env0_10);
|
||||
property = env0_3(value4 != assetIds ? assetIds : [], 1)[0];
|
||||
r6 = value4 != property ? (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(id2,
|
||||
|
||||
property, 512) : value4;
|
||||
if (value4 != r6) {
|
||||
r14 = {bannerRatio: 'activity', staticBannerSrc: r6};
|
||||
} else if (value4 == bot2) {
|
||||
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
|
||||
} else {
|
||||
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
|
||||
banner: bot2.banner, size: 512, canAnimate: false});
|
||||
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
|
||||
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
|
||||
'staticBannerSrc': null};
|
||||
}
|
||||
} else if (value4 == bot2) {
|
||||
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
|
||||
} else {
|
||||
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
|
||||
banner: bot2.banner, size: 512, canAnimate: false});
|
||||
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
|
||||
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
|
||||
'staticBannerSrc': null};
|
||||
}
|
||||
r9 = value4 != icon ? (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppIconSrc(id,
|
||||
icon, bot) : value4;
|
||||
r1 = value4 != r9 ? r9 : r14.staticBannerSrc;
|
||||
appGradientColors = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r1 ? r1 : undefined);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, baseColors, undefined);
|
||||
copyDataProperties(object2, r14, undefined);
|
||||
object2['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
|
||||
id = app.id;
|
||||
object2['appId'] = id;
|
||||
id = message.id;
|
||||
object2['messageId'] = id;
|
||||
object2['title'] = value4;
|
||||
object2['header'] = name;
|
||||
object2['info'] = value11;
|
||||
object2['tagline'] = r10;
|
||||
object2['iconSrc'] = r9;
|
||||
object2['actions'] = items;
|
||||
object2['embedUrl'] = embedUrl;
|
||||
object2['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
|
||||
} else {
|
||||
value4 = null;
|
||||
r10 = value4 == maxParticipants ? intl.string(t.RjceQU) : maxParticipants > 0 ? intl.formatToPlainString(t.z8EAJW,
|
||||
|
||||
{count: maxParticipants}) : intl.string(t.RjceQU);
|
||||
items = [];
|
||||
if (isEmbeddedApp2) {
|
||||
moduleValue2 = require(8045) /* metro dependency 8045: canLaunchFrame */;
|
||||
if (moduleValue2.canLaunchFrame(app)) {
|
||||
items.push({id: 'play_frame', label: intl.string(t.RscU7I)});
|
||||
} else {
|
||||
playInContext = (require(9466) /* metro dependency 9466: getPlayInContext */).getPlayInContext(id,
|
||||
channel_id);
|
||||
instanceId = playInContext.instanceId;
|
||||
isCurrentlyInInstance = playInContext.isCurrentlyInInstance;
|
||||
if (playInContext.canLaunchInChannel) {
|
||||
items.push({id: 'play_in_channel',
|
||||
label: isCurrentlyInInstance ? intl.string(t.DPfdsq) : value4 == instanceId ? intl.string(t.RscU7I) : intl.string(t.VJlc0S),
|
||||
|
||||
|
||||
|
||||
|
||||
disabled: isCurrentlyInInstance});
|
||||
} else {
|
||||
items.push({id: 'play_in_dm', label: intl.string(t.JeK1Wg)});
|
||||
}
|
||||
}
|
||||
}
|
||||
value11 = tags.join(' ∙ ');
|
||||
id2 = app.id;
|
||||
bot2 = app.bot;
|
||||
moduleValue4 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
|
||||
if (moduleValue4.isEmbeddedApp(app)) {
|
||||
assetIds = (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetIds(id2, env0_10);
|
||||
property = env0_3(value4 != assetIds ? assetIds : [], 1)[0];
|
||||
r6 = value4 != property ? (require(6873) /* metro dependency 6873: ApplicationAssetUtils */).getAssetImage(id2,
|
||||
|
||||
property, 512) : value4;
|
||||
if (value4 != r6) {
|
||||
r14 = {bannerRatio: 'activity', staticBannerSrc: r6};
|
||||
} else if (value4 == bot2) {
|
||||
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
|
||||
} else {
|
||||
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
|
||||
banner: bot2.banner, size: 512, canAnimate: false});
|
||||
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
|
||||
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
|
||||
'staticBannerSrc': null};
|
||||
}
|
||||
} else if (value4 == bot2) {
|
||||
r14 = {'bannerRatio': 'bot', 'staticBannerSrc': null};
|
||||
} else {
|
||||
userBannerURL = (require(1423) /* metro dependency 1423: AvatarUtils */).getUserBannerURL({id: bot2.id,
|
||||
banner: bot2.banner, size: 512, canAnimate: false});
|
||||
r14 = value4 != userBannerURL ? {bannerRatio: 'bot',
|
||||
staticBannerSrc: userBannerURL} : {'bannerRatio': 'bot',
|
||||
'staticBannerSrc': null};
|
||||
}
|
||||
r9 = value4 != icon ? (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppIconSrc(id,
|
||||
icon, bot) : value4;
|
||||
r1 = value4 != r9 ? r9 : r14.staticBannerSrc;
|
||||
appGradientColors = (require(10539) /* metro dependency 10539: nativeAppMessageEmbedUtil */).getAppGradientColors(value4 != r1 ? r1 : undefined);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, baseColors, undefined);
|
||||
copyDataProperties(object2, r14, undefined);
|
||||
object2['displayType'] = AppMessageEmbedDisplayType.DISPLAY;
|
||||
object2['appId'] = app.id;
|
||||
object2['messageId'] = message.id;
|
||||
object2['title'] = value4;
|
||||
object2['header'] = name;
|
||||
object2['info'] = value11;
|
||||
object2['tagline'] = r10;
|
||||
object2['iconSrc'] = r9;
|
||||
object2['actions'] = items;
|
||||
object2['embedUrl'] = embedUrl;
|
||||
object2['extendedType'] = CodedLinkExtendedType.APP_MESSAGE_EMBED;
|
||||
}
|
||||
object2['gradientColors'] = appGradientColors;
|
||||
object2['type'] = value4;
|
||||
object2['headerText'] = value4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handleTapAppMessageEmbed(a0) { // fn#81294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10722:3253, offset: 0x01ec7f46, size: 890 bytes, params: 2, frame: 21
|
||||
var bot;
|
||||
var object2;
|
||||
var bestActiveInput;
|
||||
var openCustomKeyboard;
|
||||
var moduleValue2;
|
||||
var launchActivityInBotDM;
|
||||
var APP_MESSAGE_EMBED;
|
||||
var channel_id;
|
||||
var moduleValue3;
|
||||
var joinOrStartActivityInChannel;
|
||||
var value;
|
||||
const application = ApplicationStore.getApplication(a0.appId);
|
||||
const value3 = undefined;
|
||||
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
const value4 = defaultImport.toURLSafe(a0.embedUrl);
|
||||
let r5 = value4 == null ? value3 : value4.searchParams.get('referrer_id');
|
||||
r5 = r5 ?? a0.message.author.id;
|
||||
const r4 = (value4 == null ? value3 : value4.searchParams.get('custom_id')) ?? value3;
|
||||
const actionId = a0.actionId;
|
||||
if (actionId === 'play_in_channel') {
|
||||
channel_id = a0.message.channel_id;
|
||||
moduleValue3 = require(10540) /* metro dependency 10540: joinOrStartActivityInChannel */;
|
||||
joinOrStartActivityInChannel = moduleValue3.joinOrStartActivityInChannel;
|
||||
object2 = {};
|
||||
object2.appId = a0.appId;
|
||||
object2.channelId = channel_id;
|
||||
object2.analyticsLocations = [(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED];
|
||||
object2.referrerId = r5;
|
||||
object2.customId = r4;
|
||||
Reflect.apply(joinOrStartActivityInChannel, moduleValue3, [object2]);
|
||||
} else {
|
||||
if (actionId === 'play_in_dm') {
|
||||
bot = application == null ? value3 : application.bot;
|
||||
if (bot == null) {
|
||||
return value3;
|
||||
}
|
||||
moduleValue2 = require(9527) /* metro dependency 9527: AppLauncherPlayUtils */;
|
||||
launchActivityInBotDM = moduleValue2.launchActivityInBotDM;
|
||||
object2 = {};
|
||||
object2.appId = a0.appId;
|
||||
bot = application.bot;
|
||||
object2.botId = bot.id;
|
||||
APP_MESSAGE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).APP_MESSAGE_EMBED;
|
||||
object2.analyticsLocations = [APP_MESSAGE_EMBED];
|
||||
APP_MESSAGE_EMBED = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin.APP_MESSAGE_EMBED;
|
||||
object2.commandOrigin = APP_MESSAGE_EMBED;
|
||||
object2.referrerId = r5;
|
||||
object2.customId = r4;
|
||||
Reflect.apply(launchActivityInBotDM, moduleValue2, [object2]);
|
||||
return value3;
|
||||
}
|
||||
if (actionId === 'play_frame') {
|
||||
(importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */).launchFrame({applicationId: a0.appId});
|
||||
return value3;
|
||||
}
|
||||
if (actionId === 'view_in_app_launcher') {
|
||||
bestActiveInput = (require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput();
|
||||
if (bestActiveInput != null) {
|
||||
openCustomKeyboard = bestActiveInput.openCustomKeyboard;
|
||||
object2 = {};
|
||||
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.APP_LAUNCHER;
|
||||
object2.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
applicationId: a0.appId, referrerId: r5, customId: r4};
|
||||
Reflect.apply(openCustomKeyboard, bestActiveInput, [object2]);
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
if (actionId === 'add_app') {
|
||||
if (application == null) {
|
||||
return value3;
|
||||
}
|
||||
(require(8870) /* metro dependency 8870: ApplicationUtils */).installApplication({applicationId: application.id,
|
||||
|
||||
customInstallUrl: application.customInstallUrl, installParams: application.installParams,
|
||||
integrationTypesConfig: application.integrationTypesConfig, source: 'app_message_embed'});
|
||||
return value3;
|
||||
}
|
||||
if (actionId === 'link_copied') {
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
value.copy(a0.embedUrl);
|
||||
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
||||
value.presentLinkCopied();
|
||||
} else {
|
||||
value = require(1360) /* metro dependency 1360: GlobalUtils */;
|
||||
value.assertNever(a0.actionId);
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/* Metro module 10540; source: modules/applications/message_embed/native/utils/joinOrStartActivityInChannel.tsx; dependencies: [5, 1378, 1379, 1934, 8111, 7860, 8091, 2] */
|
||||
function _fun81301(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:6, offset: 0x01ec8670, size: 177 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/utils/joinOrStartActivityInChannel.tsx');
|
||||
exports.joinOrStartActivityInChannel = function() {
|
||||
return _joinOrStartActivityInChannel.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _joinOrStartActivityInChannel() { // fn#81302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:136, offset: 0x01ec8721, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun81304).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun81304({appId, channelId, analyticsLocations, customId, referrerId}) { // fn#81304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10726:217, offset: 0x01ec8767, size: 368 bytes, params: 2, frame: 26
|
||||
var compositeInstanceId;
|
||||
var r4;
|
||||
var value10;
|
||||
var binding2;
|
||||
var value11;
|
||||
var runPrimaryAppCommandOrJoinEmbeddedActivity;
|
||||
var object2;
|
||||
var channel;
|
||||
if (true) {
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var binding = env2_4;
|
||||
var selfEmbeddedActivityForChannel = binding.getSelfEmbeddedActivityForChannel(channelId);
|
||||
if ((selfEmbeddedActivityForChannel == null ? value : selfEmbeddedActivityForChannel.applicationId) !== appId) {
|
||||
binding = env2_4;
|
||||
value10 = binding.getEmbeddedActivitiesForChannel(channelId).filter(function({applicationId}) {
|
||||
return applicationId === appId;
|
||||
});
|
||||
compositeInstanceId = value10.length > 0 ? value10[0].compositeInstanceId : value;
|
||||
binding = env2_0;
|
||||
binding2 = env2_2;
|
||||
value11 = binding(binding2[5]);
|
||||
runPrimaryAppCommandOrJoinEmbeddedActivity = value11.runPrimaryAppCommandOrJoinEmbeddedActivity;
|
||||
object2 = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
|
||||
binding = env2_1;
|
||||
object2.embeddedActivitiesManager = binding(binding2[6])();
|
||||
} else {
|
||||
if (env2_6.getVoiceChannelId() === channelId) {
|
||||
binding = env2_5;
|
||||
channel = binding.getChannel(channelId);
|
||||
r4 = (channel == null ? value : channel.guild_id) ?? null;
|
||||
binding = env2_1;
|
||||
binding(env2_2[4])(r4, selfEmbeddedActivityForChannel.location);
|
||||
return true;
|
||||
}
|
||||
value10 = env2_4.getEmbeddedActivitiesForChannel(channelId).filter(function({applicationId}) {
|
||||
return applicationId === appId;
|
||||
});
|
||||
compositeInstanceId = value10.length > 0 ? value10[0].compositeInstanceId : value;
|
||||
binding = env2_0;
|
||||
binding2 = env2_2;
|
||||
value11 = binding(binding2[5]);
|
||||
runPrimaryAppCommandOrJoinEmbeddedActivity = value11.runPrimaryAppCommandOrJoinEmbeddedActivity;
|
||||
object2 = {channelId: channelId, applicationId: appId, isStart: compositeInstanceId == null};
|
||||
object2.embeddedActivitiesManager = env2_1(binding2[6])();
|
||||
}
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
object2.customId = customId;
|
||||
object2.referrerId = referrerId;
|
||||
await Reflect.apply(runPrimaryAppCommandOrJoinEmbeddedActivity, value11, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 10539; source: modules/applications/message_embed/native/utils/nativeAppMessageEmbedUtil.tsx; dependencies: [4000, 697, 8372, 8373, 1423, 2] */
|
||||
function _fun81298(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:6, offset: 0x01ec8471, size: 217 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexToRgba = value.hexToRgba;
|
||||
let PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
|
||||
value = Reflect.apply(hexToRgba, value, [PRIMARY_760]);
|
||||
items = [value];
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
hexToRgba = value.hexToRgba;
|
||||
PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
|
||||
items[1] = Reflect.apply(hexToRgba, value, [PRIMARY_760]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/applications/message_embed/native/utils/nativeAppMessageEmbedUtil.tsx');
|
||||
exports.getAppGradientColors = getAppGradientColors;
|
||||
exports.getAppIconSrc = getAppIconSrc;
|
||||
}
|
||||
|
||||
function getAppGradientColors(a0) { // fn#81299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:358, offset: 0x01ec854a, size: 213 bytes, params: 2, frame: 18
|
||||
var r1;
|
||||
var heroColors;
|
||||
var primaryColor;
|
||||
var secondaryColor;
|
||||
var items2;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
if (a0 != null) {
|
||||
if ((require(8372) /* metro dependency 8372: useAvatarColor */).hasFetchedColors(a0)) {
|
||||
heroColors = (require(8373) /* metro dependency 8373: useHeroColors */).getHeroColors(a0);
|
||||
primaryColor = heroColors.primaryColor;
|
||||
secondaryColor = heroColors.secondaryColor;
|
||||
if ((primaryColor === '#000000' && secondaryColor === '#000000') !== false) {
|
||||
r1 = binding;
|
||||
} else {
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
value = value.hexToRgba(primaryColor);
|
||||
items2 = [value];
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
items2[1] = value.hexToRgba(secondaryColor);
|
||||
r1 = items2;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
(require(8372) /* metro dependency 8372: useAvatarColor */).maybeFetchColors(a0);
|
||||
}
|
||||
return binding;
|
||||
}
|
||||
|
||||
function getAppIconSrc(a0, a1, a2) { // fn#81300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10725:648, offset: 0x01ec861f, size: 81 bytes, params: 4, frame: 12
|
||||
let value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
value = value.getApplicationIconURL({id: a0, icon: a1, bot: a2, fallbackAvatar: false});
|
||||
const value2 = null;
|
||||
return value2 != value ? value : value2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user