123 lines
6.3 KiB
TypeScript
123 lines
6.3 KiB
TypeScript
/* Metro module 10218; source: actions/UserActivityActionCreators.tsx; dependencies: [5, 4396, 661, 694, 10217, 507, 2] */
|
|
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import PresenceStore from '../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as SpotifyUtilsModule from '../modules/spotify/SpotifyUtils.tsx'; /* Metro dependency 10217 */
|
|
|
|
function _fun79496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:6, offset: 0x01e557d6, size: 193 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('actions/UserActivityActionCreators.tsx');
|
|
exports.sync = sync_79500;
|
|
exports.play = play_79501;
|
|
exports.getMetadata = function() {
|
|
return _getMetadata.apply(this, arguments);
|
|
};
|
|
function _getMetadata() { // fn#79497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:136, offset: 0x01e55897, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun79499).apply(this, arguments);
|
|
function* _fun79499(a0, a1) { // fn#79499, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:183, offset: 0x01e558d4, size: 299 bytes, params: 3, frame: 23
|
|
var binding;
|
|
var activityMetadata;
|
|
var session_id;
|
|
var HTTP;
|
|
var get;
|
|
var USER_ACTIVITY_METADATA;
|
|
var value4;
|
|
var body;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
const metadata = a0.metadata;
|
|
if (metadata == null) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_4;
|
|
activityMetadata = binding.getActivityMetadata(a1);
|
|
if (activityMetadata != null) {
|
|
return activityMetadata;
|
|
}
|
|
session_id = a0.session_id;
|
|
if (session_id == null) {
|
|
throw new global.Error('null/undefined session_id');
|
|
}
|
|
binding = env2_0;
|
|
HTTP = binding(env2_2[5]).HTTP;
|
|
get = HTTP.get;
|
|
binding = env2_5;
|
|
USER_ACTIVITY_METADATA = binding.USER_ACTIVITY_METADATA;
|
|
session_id = a0.session_id;
|
|
yield Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
|
|
url: Reflect.apply(USER_ACTIVITY_METADATA, binding, [a1, session_id, a0.application_id])}]);
|
|
value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
body = value4.body;
|
|
binding = env2_1;
|
|
value = binding(env2_2[3]);
|
|
value.dispatch({type: 'ACTIVITY_METADATA_UPDATE', metadata: body, userId: a1});
|
|
} else {
|
|
var Object = global.Object;
|
|
if (Object.keys(metadata).length > 0) {
|
|
return metadata;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
activityMetadata = env2_4.getActivityMetadata(a1);
|
|
if (activityMetadata != null) {
|
|
return activityMetadata;
|
|
}
|
|
if (a0.session_id == null) {
|
|
throw new global.Error('null/undefined session_id');
|
|
}
|
|
HTTP = env2_0(env2_2[5]).HTTP;
|
|
get = HTTP.get;
|
|
binding = env2_5;
|
|
yield Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': false,
|
|
url: binding.USER_ACTIVITY_METADATA(a1, a0.session_id, a0.application_id)}]);
|
|
value4 = undefined;
|
|
if (false) {
|
|
return value4;
|
|
}
|
|
body = value4.body;
|
|
value = env2_1(env2_2[3]);
|
|
value.dispatch({type: 'ACTIVITY_METADATA_UPDATE', metadata: body, userId: a1});
|
|
}
|
|
return body;
|
|
}
|
|
|
|
}
|
|
|
|
function sync_79500(a0, a1) { // fn#79500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:701, offset: 0x01e559ff, size: 64 bytes, params: 3, frame: 13
|
|
(Dispatcher).dispatch({type: 'ACTIVITY_SYNC', activity: a0,
|
|
userId: a1});
|
|
}
|
|
|
|
function play_79501(a0, a1) { // fn#79501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:789, offset: 0x01e55a3f, size: 90 bytes, params: 3, frame: 15
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let value = SpotifyUtilsModule;
|
|
value = value.getSpotifyMetadataFromActivity(a0, a1);
|
|
value = value.then(_fun79502);
|
|
value.catch(_fun79503);
|
|
function _fun79502(a0) { // fn#79502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:858, offset: 0x01e55a99, size: 77 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
return (Dispatcher).dispatch({type: 'ACTIVITY_PLAY',
|
|
activity: env0_0, userId: require, metadata: a0});
|
|
}
|
|
|
|
function _fun79503() { // fn#79503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10404:942, offset: 0x01e55ae6, size: 69 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
return (Dispatcher).dispatch({type: 'ACTIVITY_PLAY',
|
|
activity: env0_0, userId: require});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79496, 10218, [5, 4396, 661, 694, 10217, 507,
|
|
2]) /* metro module 10218, dependencies: [5, 4396, 661, 694, 10217, 507, 2] */;
|