decord/beta/source/modules/app_dms/getAppDMApplication.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

45 lines
1.2 KiB
TypeScript

// Module ID: 12342
// Function ID: 12343
// Name: getAppDMApplication
// Dependencies: [4985, 7862, 1376, 2]
// Exports: getAppDMApplication
// Module 12342 (getAppDMApplication)
import ApplicationStore from "ApplicationStore" /* 4985 */;
import UserProfileStore from "UserProfileStore" /* 7862 */;
import UserStore from "UserStore" /* 1376 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/app_dms/getAppDMApplication.tsx");
export const getAppDMApplication = function getAppDMApplication(channel) {
let recipientId;
if (channel.isPrivate()) {
recipientId = channel.getRecipientId();
}
const user = UserStore.getUser(recipientId);
let bot;
if (user != null) {
bot = user.bot;
}
let tmp4;
if (true === bot) {
tmp4 = recipientId;
}
let appIdForBotUserId = ApplicationStore.getAppIdForBotUserId(tmp4);
if (null != tmp4) {
const userProfile = UserProfileStore.getUserProfile(tmp4);
let id;
if (userProfile != null) {
const application = userProfile.application;
if (application != null) {
id = application.id;
}
}
const tmp6 = id;
}
if (appIdForBotUserId == null) {
appIdForBotUserId = tmp6;
}
return ApplicationStore.getApplication(appIdForBotUserId);
};