decord/source/modules/app_dms/getAppDMApplication.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

45 lines
1.2 KiB
TypeScript

// Module ID: 12338
// Function ID: 12339
// Name: getAppDMApplication
// Dependencies: [4866, 7729, 1372, 2]
// Exports: getAppDMApplication
// Module 12338 (getAppDMApplication)
import ApplicationStore from "ApplicationStore" /* 4866 */;
import UserProfileStore from "UserProfileStore" /* 7729 */;
import UserStore from "UserStore" /* 1372 */;
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);
};