/* Metro module 11732; source: modules/app_dms/getAppDMApplication.tsx; dependencies: [4234, 5189, 1878, 2] */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import ApplicationStore from '../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */ import UserProfileStore from '../user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun89911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11918:6, offset: 0x02023440, size: 138 bytes, params: 8, frame: 18 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/app_dms/getAppDMApplication.tsx'); exports.getAppDMApplication = getAppDMApplication; function getAppDMApplication(a0) { // fn#89912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11918:221, offset: 0x020234ca, size: 171 bytes, params: 2, frame: 16 var userProfile; const isPrivate = a0.isPrivate(); const value2 = undefined; const r1 = isPrivate ? a0.getRecipientId() : value2; const user = UserStore.getUser(r1); let r2 = (user == null ? value2 : user.bot) !== true ? value2 : r1; const appIdForBotUserId = ApplicationStore.getAppIdForBotUserId(r2); if (r2 != null) { userProfile = UserProfileStore.getUserProfile(r2); r2 = userProfile == null || userProfile.application == null ? value2 : userProfile.application.id; } else { r2 = value2; } r2 = appIdForBotUserId ?? r2; return ApplicationStore.getApplication(r2); } } global.__d(_fun89911, 11732, [4234, 5189, 1878, 2]) /* metro module 11732, dependencies: [4234, 5189, 1878, 2] */;