2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 11907
|
|
|
|
|
// Function ID: 11908
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: getAppDMApplication
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [5440, 7321, 1390, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
// 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 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
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;
|
2026-09-18 19:45:33 +00:00
|
|
|
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;
|
2026-09-18 19:45:33 +00:00
|
|
|
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-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const getApplication = tmp5.getApplication;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (appIdForBotUserId == null) {
|
2026-10-01 14:13:23 +00:00
|
|
|
appIdForBotUserId = tmp7;
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
return getApplication(appIdForBotUserId);
|
2026-09-18 19:45:33 +00:00
|
|
|
};
|