// Module ID: 4801 // Function ID: 4802 // Name: transitionToChannel // Dependencies: [2045, 1078, 4802, 4803, 1105, 4991, 38, 2] // Exports: transitionToChannel, transitionToMessage, transitionToStaticChannelRoute, transitionToThread, transitionToThreadMessage, tryTransitionToThreadMessage // Module 4801 (transitionToChannel) import _modDef38 from "module_38" /* 38 */; import router_utils from "router_utils" /* 1105 */; import useGuildIdForChannelRoute from "useGuildIdForChannelRoute" /* 4802 */; import ChannelActionCreatorsDefault from "ChannelActionCreators" /* 4803 */; import ChannelStore from "ChannelStore" /* 2045 */; require = fn; const Routes = fn(1078).Routes; const size = fn(2); const result = size.fileFinishedImporting("modules/routing/transitionToChannel.tsx"); export const transitionToChannel = function transitionToChannel(id, openTextInVoiceIfVoiceChannel) { const channel = ChannelStore.getChannel(id); if (null != channel) { const guildIdForGenericRedirect = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel); const tmp7 = importDefault; ChannelActionCreatorsDefault.preload(channel.guild_id, channel.id); const obj = { openChannel: true }; const obj5 = router_utils; const merged = Object.assign(openTextInVoiceIfVoiceChannel); obj5.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect, channel.id), obj); let prop; if (openTextInVoiceIfVoiceChannel != null) { prop = openTextInVoiceIfVoiceChannel.openTextInVoiceIfVoiceChannel; } if (prop) { prop = channel.isGuildVocal(); } if (prop) { tmp7(4991).updateChatOpen(channel.id, true); const tmp7Result = tmp7(4991); } const CHANNELResult = Routes.CHANNEL(guildIdForGenericRedirect, channel.id); } }; export const transitionToThread = function transitionToThread(channel, arg1) { _modDef38(null != channel.parent_id, "Thread must have a parent ID."); const guildIdForGenericRedirect = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel); const obj2 = router_utils; const obj3 = { openChannel: true }; const merged = Object.assign(arg1); obj2.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect, channel.id), obj3); }; export const transitionToThreadMessage = function transitionToThreadMessage(channel, id, arg2) { _modDef38(null != channel.parent_id, "Thread must have a parent ID."); const guildIdForGenericRedirect = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel); const obj2 = router_utils; const obj3 = { openChannel: true }; const merged = Object.assign(arg2); obj2.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect, channel.id, id), obj3); }; export const tryTransitionToThreadMessage = function tryTransitionToThreadMessage(parentChannelId, threadId, messageId, arg3) { const channel = ChannelStore.getChannel(threadId); if (null != channel) { _modDef38(null != channel.parent_id, "Thread must have a parent ID."); const guildIdForGenericRedirect = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel); const obj2 = { openChannel: true }; const obj4 = router_utils; const merged = Object.assign(arg3); obj4.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect, channel.id, messageId), obj2); const CHANNELResult = Routes.CHANNEL(guildIdForGenericRedirect, channel.id, messageId); } else { const channel1 = ChannelStore.getChannel(parentChannelId); if (null != channel1) { const guildIdForGenericRedirect1 = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel1); const tmp20 = importDefault; ChannelActionCreatorsDefault.preload(channel1.guild_id, channel1.id); const obj5 = { openChannel: true }; const obj9 = router_utils; const merged1 = Object.assign(arg3); obj9.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect1, channel1.id), obj5); let prop; if (arg3 != null) { prop = arg3.openTextInVoiceIfVoiceChannel; } if (prop) { prop = channel1.isGuildVocal(); } if (prop) { tmp20(4991).updateChatOpen(channel1.id, true); const tmp20Result = tmp20(4991); } const CHANNELResult1 = Routes.CHANNEL(guildIdForGenericRedirect1, channel1.id); } } }; export const transitionToMessage = function transitionToMessage(channelId, messageId, arg2) { const channel = ChannelStore.getChannel(channelId); if (null != channel) { const guildIdForGenericRedirect = useGuildIdForChannelRoute.getGuildIdForGenericRedirect(channel); const obj3 = { openChannel: true }; const obj2 = router_utils; const merged = Object.assign(arg2); obj2.transitionTo(Routes.CHANNEL(guildIdForGenericRedirect, channel.id, messageId), obj3); const CHANNELResult = Routes.CHANNEL(guildIdForGenericRedirect, channel.id, messageId); } }; export const transitionToStaticChannelRoute = function transitionToStaticChannelRoute(guildId, GUILD_HOME, arg2) { const obj = router_utils; const obj2 = { openChannel: true }; const merged = Object.assign(arg2); obj.transitionTo(Routes.CHANNEL(guildId, GUILD_HOME), obj2); };