Files
2026-07-28 01:06:53 +03:00

51 lines
3.9 KiB
TypeScript

/* Metro module 6979; source: modules/soundboard/trackSoundPlayed.tsx; dependencies: [4266, 1379, 4294, 1934, 4614, 661, 1880, 683, 2] */
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import RunningGameStoreNative from '../game_detection/RunningGameStore.native.tsx'; /* Metro dependency 4266 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as SoundboardConstantsModule from './SoundboardConstants.tsx'; /* Metro dependency 4614 */
function _fun55358(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7157:6, offset: 0x013a4468, size: 236 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/soundboard/trackSoundPlayed.tsx');
exports.default = trackSoundPlayed;
function trackSoundPlayed(a0, a1, a2, a3, a4) { // fn#55359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7157:353, offset: 0x013a4554, size: 387 bytes, params: 6, frame: 25
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const selectedChannelStoreBinding = SelectedChannelStore;
const getVoiceChannelId = selectedChannelStoreBinding.getVoiceChannelId;
const value2 = Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getVoiceChannelId,
selectedChannelStoreBinding, [])]);
const value3 = null;
const value4 = undefined;
const r12 = value3 == value2 ? value4 : value2.getGuildId();
const rtcConnectionStoreBinding = RTCConnectionStore;
const mediaSessionId = rtcConnectionStoreBinding.getMediaSessionId();
const rTCConnectionId = rtcConnectionStoreBinding.getRTCConnectionId();
const currentGameForAnalytics = RunningGameStoreNative.getCurrentGameForAnalytics();
const name = value3 == currentGameForAnalytics ? value4 : currentGameForAnalytics.name;
let r13 = r12 !== a2.guildId && a2.guildId !== DEFAULT_SOUND_GUILD_ID;
const r8 = a2.guildId === DEFAULT_SOUND_GUILD_ID ? 'default' : r13 ? 'custom-external' : 'custom';
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PREMIUM_FEATURE_USAGE = AnalyticEvents.PREMIUM_FEATURE_USAGE;
const SOUNDBOARD_PLAY = AnalyticsPremiumFeatureNames.SOUNDBOARD_PLAY;
r13 = r13 ? AnalyticsPremiumFeatureTiers.PREMIUM_STANDARD : AnalyticsPremiumFeatureTiers.FREE;
Reflect.apply(track, defaultImport, [PREMIUM_FEATURE_USAGE, {feature_name: SOUNDBOARD_PLAY, feature_tier: r13,
guild_id: r12, home_guild_id: a2.guildId, location_stack: a0, rtc_connection_id: rTCConnectionId,
media_session_id: mediaSessionId, in_overlay: a1, application_name: name,
emoji_count: value3 != a2.emojiId || value3 != a2.emojiName ? 1 : 0, feature_selection: r8,
feature_selection_id: a2.soundId, sound_type: a3, sequence_number: value3 != a4 ? a4 + 1 : value3}]);
return value4;
}
}
global.__d(_fun55358, 6979, [4266, 1379, 4294, 1934, 4614, 661, 1880, 683,
2]) /* metro module 6979, dependencies: [4266, 1379, 4294, 1934, 4614, 661, 1880, 683, 2] */;