decord/beta/source/modules/app_dms/getAppDMApplication.tsx

49 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 11907
// Function ID: 11908
// Name: getAppDMApplication
2026-10-12 16:32:48 +00:00
// Dependencies: [5440, 7321, 1390, 2]
// Exports: getAppDMApplication
2026-10-12 16:32:48 +00:00
// Module 11907 (getAppDMApplication)
import ApplicationStore from "ApplicationStore" /* 5440 */;
import UserProfileStore from "UserProfileStore" /* 7321 */;
import UserStore from "UserStore" /* 1390 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/app_dms/getAppDMApplication.tsx");
export const getAppDMApplication = function getAppDMApplication(channel) {
2026-10-01 14:13:23 +00:00
let tmp7;
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);
2026-10-01 14:13:23 +00:00
const tmp5 = ApplicationStore;
if (null != tmp4) {
const userProfile = UserProfileStore.getUserProfile(tmp4);
let id;
if (userProfile != null) {
const application = userProfile.application;
if (application != null) {
id = application.id;
}
}
2026-10-01 14:13:23 +00:00
tmp7 = id;
}
2026-10-01 14:13:23 +00:00
const getApplication = tmp5.getApplication;
if (appIdForBotUserId == null) {
2026-10-01 14:13:23 +00:00
appIdForBotUserId = tmp7;
}
2026-10-01 14:13:23 +00:00
return getApplication(appIdForBotUserId);
};