51 lines
2.9 KiB
TypeScript
51 lines
2.9 KiB
TypeScript
/* Metro module 7242; source: modules/autocompleter/createAutocompleterResultForChannelId.tsx; dependencies: [1379, 3793, 1878, 6587, 661, 4805, 2] */
|
|
function _fun58227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:6, offset: 0x016c22b9, size: 188 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const env0_5 = (require(6587) /* metro dependency 6587: AutocompleterConstants */).AutocompleterResultTypes;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/autocompleter/createAutocompleterResultForChannelId.tsx');
|
|
exports.default = createAutocompleterResultForChannelId;
|
|
}
|
|
|
|
function createAutocompleterResultForChannelId(a0) { // fn#58228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:291, offset: 0x016c2375, size: 341 bytes, params: 2, frame: 19
|
|
let value = a1;
|
|
const value2 = a2;
|
|
const value3 = a3;
|
|
const r2 = value !== undefined ? value : ChannelStore;
|
|
const r4 = value2 !== undefined ? value2 : UserStore;
|
|
const r3 = value3 !== undefined ? value3 : RelationshipStore;
|
|
value = r2.getChannel(a0);
|
|
const value4 = null;
|
|
if (value4 == value) {
|
|
return value4;
|
|
}
|
|
const channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value, r4, r3);
|
|
const type = value.type;
|
|
const DM = ChannelTypes.DM;
|
|
if (DM === type) {
|
|
value = r4.getUser(value.getRecipientId());
|
|
return value4 == value ? value4 : {type: AutocompleterResultTypes.USER, record: value, score: 0,
|
|
comparator: channelName};
|
|
}
|
|
const GROUP_DM = ChannelTypes.GROUP_DM;
|
|
if (GROUP_DM === type) {
|
|
return {type: AutocompleterResultTypes.GROUP_DM, record: value, score: 0, comparator: channelName};
|
|
}
|
|
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
|
|
if (GUILD_VOICE === type) {
|
|
return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName};
|
|
}
|
|
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
|
|
if (GUILD_STAGE_VOICE === type) {
|
|
return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName};
|
|
}
|
|
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
|
|
return {type: TEXT_CHANNEL, record: value, score: 0, comparator: channelName};
|
|
}
|
|
|