Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
// Module ID: 12329
|
|
// Function ID: 12330
|
|
// Name: getAppDMApplication
|
|
// Dependencies: [4864, 7723, 1371, 2]
|
|
// Exports: getAppDMApplication
|
|
|
|
// Module 12329 (getAppDMApplication)
|
|
import ApplicationStore from "ApplicationStore" /* 4864 */;
|
|
import UserProfileStore from "UserProfileStore" /* 7723 */;
|
|
import UserStore from "UserStore" /* 1371 */;
|
|
|
|
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);
|
|
};
|