Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,10 @@
|
||||
/* Metro module 12560; source: modules/local_push_notification/native/Constants.tsx; dependencies: [2] */
|
||||
function _fun96110(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12750:6, offset: 0x02155951, size: 122 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/local_push_notification/native/Constants.tsx');
|
||||
exports.LocalNotificationTypes = {GUILD_VERIFICATION: 'GUILD_VERIFICATION', CALL_RING: 'CALL_RING',
|
||||
MESSAGE_SEND_FAILED: 'MESSAGE_SEND_FAILED'};
|
||||
exports.FIRE_DATE_FORMAT = 'YYYY-MM-DDTHH:mm:ss.sssZ';
|
||||
}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/* Metro module 16230; source: modules/local_push_notification/native/LocalPushNotificationActionCreators.tsx; dependencies: [12560, 661, 4884, 694, 1216, 683, 6593, 8112, 1962, 4601, 4044, 2] */
|
||||
function _fun125541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16438:6, offset: 0x025dbfa0, size: 146 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(12560) /* metro dependency 12560: Constants */).LocalNotificationTypes;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/local_push_notification/native/LocalPushNotificationActionCreators.tsx');
|
||||
exports.receiveLocalNotification = receiveLocalNotification;
|
||||
}
|
||||
|
||||
function receiveLocalNotification(a0) { // fn#125542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16438:294, offset: 0x025dc032, size: 186 bytes, params: 2, frame: 16
|
||||
const closure = receiveLocalNotificationDispatch;
|
||||
const getData = a0.getData;
|
||||
if (getData != null) {
|
||||
var value;
|
||||
(require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppOpened('notification');
|
||||
var type = a0.getData().type;
|
||||
var GUILD_VERIFICATION = LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
if (GUILD_VERIFICATION === type) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
if (value.isDispatching()) {
|
||||
global.setImmediate(closure);
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
var CALL_RING = LocalNotificationTypes.CALL_RING;
|
||||
if (CALL_RING === type) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
if (value.isDispatching()) {
|
||||
global.setImmediate(closure);
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
var MESSAGE_SEND_FAILED = LocalNotificationTypes.MESSAGE_SEND_FAILED;
|
||||
if (MESSAGE_SEND_FAILED === type) {
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
if (value.isDispatching()) {
|
||||
global.setImmediate(closure);
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function receiveLocalNotificationDispatch() { // fn#125543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16438:572, owner: receiveLocalNotification.dispatch, offset: 0x025dc0ec, size: 396 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
importDefault(dependencyMap[3]).dispatch({type: 'PUSH_NOTIFICATION_CLICK'});
|
||||
const defaultImport2 = importDefault(dependencyMap[4]);
|
||||
const addBreadcrumb = defaultImport2.addBreadcrumb;
|
||||
let type = env0_0.type;
|
||||
Reflect.apply(addBreadcrumb, defaultImport2, [{message: 'Notification Clicked', data: {type: type}}]);
|
||||
const defaultImport3 = importDefault(dependencyMap[5]);
|
||||
const track = defaultImport3.track;
|
||||
const NOTIFICATION_CLICKED = AnalyticEvents.NOTIFICATION_CLICKED;
|
||||
Reflect.apply(track, defaultImport3, [NOTIFICATION_CLICKED, {notif_type: env0_0.type,
|
||||
guild_id: 'guildId' in env0_0 ? env0_0.guildId : null}]);
|
||||
type = env0_0.type;
|
||||
const GUILD_VERIFICATION = LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
if (GUILD_VERIFICATION === type) {
|
||||
value = importDefault(dependencyMap[6]);
|
||||
value.transitionToGuildSync(env0_0.guildId);
|
||||
} else if (LocalNotificationTypes.CALL_RING === type) {
|
||||
value = require(dependencyMap[8]);
|
||||
value = value(dependencyMap[7], dependencyMap.paths);
|
||||
value.then(_fun125544);
|
||||
} else if (LocalNotificationTypes.MESSAGE_SEND_FAILED === type) {
|
||||
value = require(dependencyMap[8]);
|
||||
value = value(dependencyMap[9], dependencyMap.paths);
|
||||
value.then(_fun125545);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun125544({default: property}) { // fn#125544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16438:947, offset: 0x025dc278, size: 29 bytes, params: 2, frame: 11
|
||||
return property(env1_0.channelId);
|
||||
}
|
||||
|
||||
function _fun125545({transitionToMessage}) { // fn#125545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16438:1040, offset: 0x025dc295, size: 83 bytes, params: 2, frame: 17
|
||||
const channelId = env1_0.channelId;
|
||||
const messageId = env1_0.messageId;
|
||||
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
|
||||
const INSTANT = JumpTypes.INSTANT;
|
||||
return transitionToMessage(channelId, messageId, {jumpType: INSTANT});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
/* Metro module 12559; source: modules/local_push_notification/native/LocalPushNotificationStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 4798, 12560, 661, 10741, 3738, 1244, 566, 694, 2] */
|
||||
function _fun96093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:6, offset: 0x02155348, size: 451 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
|
||||
const constantsModule = require(12560) /* metro dependency 12560: Constants */;
|
||||
const env0_10 = constantsModule.LocalNotificationTypes;
|
||||
const env0_11 = constantsModule.FIRE_DATE_FORMAT;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).VerificationLevels;
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun96099(Store).displayName = 'LocalPushNotificationStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_96103,
|
||||
GUILD_CREATE: GUILD_CREATE_96107, GUILD_DELETE: GUILD_DELETE_96108, LOGOUT: LOGOUT_96109});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/local_push_notification/native/LocalPushNotificationStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_96094() { // fn#96094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:255, offset: 0x0215550b, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_96094_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleSchedule(a0) { // fn#96097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:462, offset: 0x0215556d, size: 24 bytes, params: 2, frame: 11
|
||||
env0_13.add(a0);
|
||||
}
|
||||
|
||||
function handleCancel_96098(a0) { // fn#96098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:498, offset: 0x02155585, size: 55 bytes, params: 2, frame: 13
|
||||
(importDefault(10741) /* metro dependency 10741: PushNotification */).cancelLocalNotifications(a0);
|
||||
env0_13.delete(a0);
|
||||
}
|
||||
|
||||
function _fun96099(a0) { // fn#96099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:577, offset: 0x021555bc, size: 99 bytes, params: 2, frame: 16
|
||||
const closure = LocalPushNotificationStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(GuildStore, GuildVerificationStore);
|
||||
}}, {key: 'isScheduled', value: value_96102}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_96103() { // fn#96103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:1123, offset: 0x0215561f, size: 47 bytes, params: 1, frame: 12
|
||||
(importDefault(10741) /* metro dependency 10741: PushNotification */).getScheduledLocalNotifications(function(a0) {
|
||||
a0.filter(_fun96105).forEach(_fun96106);
|
||||
});
|
||||
}
|
||||
|
||||
function GUILD_CREATE_96107({guild}) { // fn#96107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:1452, offset: 0x0215571c, size: 446 bytes, params: 2, frame: 19
|
||||
var r9;
|
||||
var verificationLevel;
|
||||
var object3;
|
||||
var defaultImport3;
|
||||
var scheduleLocalNotification;
|
||||
var object4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const id = guild.id;
|
||||
const guild2 = GuildStore.getGuild(id);
|
||||
if (guild2 == null) {
|
||||
return false;
|
||||
}
|
||||
const check = GuildVerificationStore.getCheck(id);
|
||||
if (!check.canChat) {
|
||||
verificationLevel = guild2.verificationLevel;
|
||||
if (verificationLevel === VerificationLevels.MEDIUM) {
|
||||
verificationLevel = guild2.verificationLevel;
|
||||
r9 = VerificationLevels.MEDIUM === verificationLevel ? (importDefault(3738) /* metro dependency 3738 */)(check.accountDeadline) : VerificationLevels.HIGH !== verificationLevel ? undefined : (importDefault(3738) /* metro dependency 3738 */)(check.memberDeadline);
|
||||
if (r9 != null) {
|
||||
if (!r9.isSameOrBefore((importDefault(3738) /* metro dependency 3738 */)(), 'minute')) {
|
||||
object3 = {};
|
||||
object3.type = LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
object3.guildId = guild2.id;
|
||||
handleSchedule(object3);
|
||||
defaultImport3 = importDefault(10741) /* metro dependency 10741: PushNotification */;
|
||||
scheduleLocalNotification = defaultImport3.scheduleLocalNotification;
|
||||
object4 = {userInfo: object3};
|
||||
object4.fireDate = r9.format(FIRE_DATE_FORMAT);
|
||||
object4.alertTitle = guild2.name;
|
||||
object4.alertBody = intl.string(t['hrDBa+']);
|
||||
object4.category = 'local';
|
||||
Reflect.apply(scheduleLocalNotification, defaultImport3, [object4]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
verificationLevel = guild2.verificationLevel;
|
||||
if (verificationLevel === VerificationLevels.HIGH) {
|
||||
verificationLevel = guild2.verificationLevel;
|
||||
r9 = VerificationLevels.MEDIUM === verificationLevel ? (importDefault(3738) /* metro dependency 3738 */)(check.accountDeadline) : VerificationLevels.HIGH !== verificationLevel ? undefined : (importDefault(3738) /* metro dependency 3738 */)(check.memberDeadline);
|
||||
if (r9 != null) {
|
||||
if (!r9.isSameOrBefore((importDefault(3738) /* metro dependency 3738 */)(), 'minute')) {
|
||||
object3 = {};
|
||||
object3.type = LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
object3.guildId = guild2.id;
|
||||
handleSchedule(object3);
|
||||
defaultImport3 = importDefault(10741) /* metro dependency 10741: PushNotification */;
|
||||
scheduleLocalNotification = defaultImport3.scheduleLocalNotification;
|
||||
object4 = {userInfo: object3};
|
||||
object4.fireDate = r9.format(FIRE_DATE_FORMAT);
|
||||
object4.alertTitle = guild2.name;
|
||||
object4.alertBody = intl.string(t['hrDBa+']);
|
||||
object4.category = 'local';
|
||||
Reflect.apply(scheduleLocalNotification, defaultImport3, [object4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GUILD_DELETE_96108({guild}) { // fn#96108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:2062, offset: 0x021558da, size: 68 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
const GUILD_VERIFICATION = LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
object2.type = GUILD_VERIFICATION;
|
||||
object2.guildId = guild.id;
|
||||
const binding = env0_13;
|
||||
if (binding.has(object2)) {
|
||||
handleCancel_96098(object2);
|
||||
}
|
||||
}
|
||||
|
||||
function LOGOUT_96109() { // fn#96109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:2181, offset: 0x0215591e, size: 51 bytes, params: 1, frame: 11
|
||||
env0_13.clear();
|
||||
(importDefault(10741) /* metro dependency 10741: PushNotification */).cancelAllLocalNotifications();
|
||||
}
|
||||
|
||||
function _fun96104(a0) { // fn#96104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:1201, offset: 0x0215564e, size: 43 bytes, params: 2, frame: 12
|
||||
a0.filter(_fun96105).forEach(function({userInfo}) {
|
||||
var guildId = userInfo.guildId;
|
||||
if (GuildStore.getGuild(guildId) == null) {
|
||||
importDefault(dependencyMap[9]).cancelLocalNotifications(userInfo);
|
||||
handleCancel_96098(userInfo);
|
||||
} else if (GuildVerificationStore.canChatInGuild(guildId)) {
|
||||
importDefault(dependencyMap[9]).cancelLocalNotifications(userInfo);
|
||||
handleCancel_96098(userInfo);
|
||||
} else {
|
||||
handleSchedule(userInfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function _fun96105(a0) { // fn#96105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12749:1215, offset: 0x02155679, size: 48 bytes, params: 2, frame: 3
|
||||
var r0;
|
||||
var type;
|
||||
const userInfo = a0.userInfo;
|
||||
let value = userInfo != null;
|
||||
if (value) {
|
||||
type = a0.userInfo.type;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = type === LocalNotificationTypes.GUILD_VERIFICATION;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user