402 lines
24 KiB
TypeScript
402 lines
24 KiB
TypeScript
/* Metro module 6610; source: utils/NotificationSettingsUtils.tsx; dependencies: [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683, 2] */
|
|
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import MessageStore from '../stores/MessageStore.tsx'; /* Metro dependency 4814 */
|
|
import AppAnalyticsUtils from '../modules/app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
|
|
import UserGuildSettingsStore from '../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
|
|
import LastMentionTimestampStore from '../modules/notifications/LastMentionTimestampStore.tsx'; /* Metro dependency 6611 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
|
|
import * as NotificationConstantsModule from '../modules/notifications/NotificationConstants.tsx'; /* Metro dependency 3796 */
|
|
import * as ReadStateConstantsModule from '../modules/read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
|
|
|
|
function _fun52182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:6, offset: 0x01321b2a, size: 981 bytes, params: 8, frame: 26
|
|
let env0_0 = require;
|
|
const differ = function(a0, a1, a2) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = 'RETURN_PREVIOUS_WHEN_CHANGED';
|
|
return _fun52184;
|
|
};
|
|
const closure = function(a0) {
|
|
var r0;
|
|
var Date;
|
|
var end_time;
|
|
var value2;
|
|
var value = null;
|
|
if (value != a0) {
|
|
if (value != a0.end_time) {
|
|
Date = global.Date;
|
|
end_time = a0.end_time;
|
|
value2 = new Date();
|
|
value2 = value2.getTime();
|
|
r0 = value2;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
const getCurrentGuildSettings2 = getCurrentGuildSettings;
|
|
const getCurrentChannelSettings2 = getCurrentChannelSettings;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_7 = value.AnalyticEvents;
|
|
const UserNotificationSettings = value.UserNotificationSettings;
|
|
value = require(670) /* metro dependency 670: UserSettingsConstants */;
|
|
const env0_11 = value.ChannelNotificationSettingsFlags;
|
|
const env0_12 = value.GuildNotificationSettingsFlags;
|
|
const object2 = {forumThreadsCreated: forumThreadsCreated, suppressEveryone: suppressEveryone,
|
|
suppressRoles: suppressRoles, highlights: highlights, mobilePush: mobilePush, optedIn: optedIn,
|
|
favorited: favorited, muted: muted, mutedEvents: mutedEvents, unreads: unreads, notifications: notifications};
|
|
Object = global.Object;
|
|
const freeze = Object.freeze;
|
|
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
|
|
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
|
|
const NULL = UserNotificationSettings.NULL;
|
|
value = Reflect.apply(freeze, Object, [{[ALL_MESSAGES]: 'All', [ONLY_MENTIONS]: 'Mentions',
|
|
[NO_MESSAGES]: 'Nothing', [NULL]: null}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/NotificationSettingsUtils.tsx');
|
|
exports.NotificationLabels = {ForumThreadsCreatedOn: 'enabled forum thread created notifs',
|
|
ForumThreadsCreatedOff: 'disabled forum thread created notifs', SuppressEveryoneOn: 'enabled suppress everyone',
|
|
SuppressEveryoneOff: 'disabled suppress everyone', SuppressRolesOn: 'enabled suppress roles',
|
|
SuppressRolesOff: 'disabled suppress roles', HighlightsOn: 'enabled highlights',
|
|
HighlightsOff: 'disabled highlights', MobilePushOn: 'enabled mobile push notifications',
|
|
MobilePushOff: 'disabled mobile push notifications', UnreadsAll: 'unreads set to all messages',
|
|
UnreadsMentions: 'unreads set to mentions', UnreadsDefault: 'unreads set to the default',
|
|
NotificationsAll: 'notifications set to all messages', NotificationsMentions: 'notifications set to mentions',
|
|
NotificationsNothing: 'notifications set to nothing', NotificationsDefault: 'notifications set to the default',
|
|
PresetAll: 'notification preset set to all messages', PresetMentions: 'notification preset set to mentions',
|
|
PresetNothing: 'notification preset set to nothing', PresetDefault: 'notification preset set to the default',
|
|
OptedIn: 'opted in to entity', OptedOut: 'opted out from entity', Favorited: 'favorited',
|
|
UnFavorited: 'unfavorited', Muted: 'muted', Unmuted: 'unmuted', MutedScheduledEvents: 'muted scheduled events',
|
|
UnmutedScheduledEvents: 'unmuted scheduled events', OverrideCreated: 'channel override created',
|
|
OverrideDeleted: 'channel override deleted',
|
|
AnnouncementAutoEnable: 'announcement channels auto set to all messages'};
|
|
exports.NotificationLabel = object2;
|
|
exports.MessageNotificationSettings = value;
|
|
exports.trackGuildNotificationSettingsUpdate = trackGuildNotificationSettingsUpdate;
|
|
exports.muteConfigToTimestamp = closure;
|
|
exports.trackChannelNotificationSettingsUpdate = trackChannelNotificationSettingsUpdate;
|
|
exports.getCurrentGuildSettings = getCurrentGuildSettings2;
|
|
exports.getManyCurrentGuildSettings = function(a0) {
|
|
var Map = global.Map;
|
|
var value2 = new Map();
|
|
var env0_0 = value2;
|
|
a0.forEach(_fun52204);
|
|
return value2;
|
|
};
|
|
exports.getCurrentChannelSettings = getCurrentChannelSettings2;
|
|
exports.getManyCurrentChannelSettings = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var Map = global.Map;
|
|
var value2 = new Map();
|
|
var env0_1 = value2;
|
|
a1.forEach(_fun52206);
|
|
return value2;
|
|
};
|
|
exports.trackAccountNotificationSettingUpdated = function(a0, a1) {
|
|
var defaultImport = importDefault(dependencyMap[10]);
|
|
var NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
|
|
defaultImport.track(NOTIFICATION_SETTINGS_UPDATED, {update_type: NotificationSettingsUpdateType.ACCOUNT,
|
|
quiet_mode_enabled: a0.quietMode, quiet_mode_enabled_old: a1.quietMode});
|
|
};
|
|
function differ(a0, a1, a2) { // fn#52183, offset: 0x01321eff, size: 33 bytes, params: 4, frame: 2
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return _fun52184;
|
|
function _fun52184(a0) { // fn#52184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2719, offset: 0x01321f20, size: 56 bytes, params: 2, frame: 5
|
|
if (env0_2 === 'RETURN_PREVIOUS_WHEN_CHANGED') {
|
|
return env0_0[a0] === require[a0] ? undefined : env0_0[a0];
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function getCurrentGuildSettings(a0) { // fn#52186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2896, offset: 0x01321fa3, size: 268 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var end_time;
|
|
var Date;
|
|
var value4;
|
|
var date;
|
|
const isMuted2 = UserGuildSettingsStore.isMuted(a0);
|
|
const muteConfig = UserGuildSettingsStore.getMuteConfig(a0);
|
|
const object = {};
|
|
object.guild_suppress_everyone = UserGuildSettingsStore.isSuppressEveryoneEnabled(a0);
|
|
object.guild_suppress_roles = UserGuildSettingsStore.isSuppressRolesEnabled(a0);
|
|
object.guild_scheduled_events_muted = UserGuildSettingsStore.isMuteScheduledEventsEnabled(a0);
|
|
object.guild_is_muted = isMuted2;
|
|
const value3 = null;
|
|
if (value3 != muteConfig) {
|
|
end_time = muteConfig.end_time;
|
|
if (value3 != end_time) {
|
|
Date = global.Date;
|
|
end_time = muteConfig.end_time;
|
|
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
r2 = (date instanceof Object ? date : value4).getTime();
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
object.guild_muted_until = r2;
|
|
object.guild_receive_mobile_push = UserGuildSettingsStore.isMobilePushEnabled(a0);
|
|
const binding = env0_14;
|
|
userGuildSettingsStoreBinding = UserGuildSettingsStore;
|
|
const getMessageNotifications = userGuildSettingsStoreBinding.getMessageNotifications;
|
|
object.guild_message_notification_settings = binding[Reflect.apply(getMessageNotifications,
|
|
userGuildSettingsStoreBinding, [a0])];
|
|
object.guild_notify_highlights = UserGuildSettingsStore.getNotifyHighlights(a0);
|
|
object.guild_flags = UserGuildSettingsStore.getGuildFlags(a0);
|
|
return object;
|
|
}
|
|
|
|
function getCurrentChannelSettings(a0, a1) { // fn#52187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3443, offset: 0x013220af, size: 175 bytes, params: 3, frame: 17
|
|
var r2;
|
|
var end_time;
|
|
var Date;
|
|
var value4;
|
|
var date;
|
|
const isChannelMuted2 = UserGuildSettingsStore.isChannelMuted(a0, a1);
|
|
const channelMuteConfig = UserGuildSettingsStore.getChannelMuteConfig(a0, a1);
|
|
const object = {channel_is_muted: isChannelMuted2};
|
|
const value3 = null;
|
|
if (value3 != channelMuteConfig) {
|
|
end_time = channelMuteConfig.end_time;
|
|
if (value3 != end_time) {
|
|
Date = global.Date;
|
|
end_time = channelMuteConfig.end_time;
|
|
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
r2 = (date instanceof Object ? date : value4).getTime();
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
} else {
|
|
r2 = value3;
|
|
}
|
|
object.channel_muted_until = r2;
|
|
const binding = env0_14;
|
|
userGuildSettingsStoreBinding = UserGuildSettingsStore;
|
|
const getChannelMessageNotifications = userGuildSettingsStoreBinding.getChannelMessageNotifications;
|
|
object.channel_message_notification_settings = binding[Reflect.apply(getChannelMessageNotifications,
|
|
userGuildSettingsStoreBinding, [a0, a1])];
|
|
object.channel_flags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
|
|
return object;
|
|
}
|
|
|
|
function forumThreadsCreated(a0) { // fn#52188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1878, offset: 0x0132215e, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.ForumThreadsCreatedOn : binding.ForumThreadsCreatedOff;
|
|
}
|
|
|
|
function suppressEveryone(a0) { // fn#52189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1949, offset: 0x0132217b, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.SuppressEveryoneOn : binding.SuppressEveryoneOff;
|
|
}
|
|
|
|
function suppressRoles(a0) { // fn#52190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2011, offset: 0x01322198, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.SuppressRolesOn : binding.SuppressRolesOff;
|
|
}
|
|
|
|
function highlights(a0) { // fn#52191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2064, offset: 0x013221b5, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.HighlightsOn : binding.HighlightsOff;
|
|
}
|
|
|
|
function mobilePush(a0) { // fn#52192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2111, offset: 0x013221d2, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.MobilePushOn : binding.MobilePushOff;
|
|
}
|
|
|
|
function optedIn(a0) { // fn#52193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2155, offset: 0x013221ef, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.OptedIn : binding.OptedOut;
|
|
}
|
|
|
|
function favorited(a0) { // fn#52194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2191, offset: 0x0132220c, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.Favorited : binding.UnFavorited;
|
|
}
|
|
|
|
function muted(a0) { // fn#52195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2228, offset: 0x01322229, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.Muted : binding.Unmuted;
|
|
}
|
|
|
|
function mutedEvents(a0) { // fn#52196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2263, offset: 0x01322246, size: 29 bytes, params: 2, frame: 3
|
|
const binding = env0_13;
|
|
return a0 ? binding.MutedScheduledEvents : binding.UnmutedScheduledEvents;
|
|
}
|
|
|
|
function unreads(a0) { // fn#52197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2324, offset: 0x01322263, size: 70 bytes, params: 2, frame: 3
|
|
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
|
|
return a0 === ALL_MESSAGES ? env0_13.UnreadsAll : a0 === UnreadSetting.ONLY_MENTIONS ? env0_13.UnreadsMentions : env0_13.UnreadsDefault;
|
|
}
|
|
|
|
function notifications(a0) { // fn#52198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2428, offset: 0x013222a9, size: 96 bytes, params: 2, frame: 3
|
|
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
return a0 === ALL_MESSAGES ? env0_13.NotificationsAll : a0 === UserNotificationSettings.ONLY_MENTIONS ? env0_13.NotificationsMentions : a0 === UserNotificationSettings.NO_MESSAGES ? env0_13.NotificationsNothing : env0_13.NotificationsDefault;
|
|
}
|
|
|
|
function trackGuildNotificationSettingsUpdate(a0, a1, a2, a3, a4) { // fn#52199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3954, offset: 0x01322309, size: 451 bytes, params: 6, frame: 23
|
|
const trackGuildNotificationSettingsUpdateCompute2 = trackGuildNotificationSettingsUpdateCompute;
|
|
let value = trackGuildNotificationSettingsUpdateCompute2(a2);
|
|
const value4 = trackGuildNotificationSettingsUpdateCompute2(getCurrentGuildSettings(a0), a1);
|
|
value = differ(value, value4, 'RETURN_PREVIOUS_WHEN_CHANGED');
|
|
const value5 = value('guild_flags');
|
|
const value6 = 0;
|
|
const value7 = (value4.guild_flags ?? value6) ^ (value5 ?? value6);
|
|
const removeFlags = FlagUtilsModule.removeFlags;
|
|
const OPT_IN_CHANNELS_OFF = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_OFF;
|
|
const OPT_IN_CHANNELS_ON = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_ON;
|
|
const value8 = Reflect.apply(removeFlags, FlagUtilsModule, [value7, OPT_IN_CHANNELS_OFF, OPT_IN_CHANNELS_ON]);
|
|
const defaultImport = AppAnalyticsUtils;
|
|
const trackWithMetadata = defaultImport.trackWithMetadata;
|
|
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
|
|
const object = {};
|
|
copyDataProperties(object, value4, undefined);
|
|
const lastMentionTimestampStoreBinding = LastMentionTimestampStore;
|
|
const getStats = lastMentionTimestampStoreBinding.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, lastMentionTimestampStoreBinding, [a0]), undefined);
|
|
object['location'] = a4;
|
|
object['guild_id'] = a0;
|
|
const GUILD = NotificationSettingsUpdateType.GUILD;
|
|
object['update_type'] = GUILD;
|
|
object['label'] = a3;
|
|
object['guild_flags_old'] = value('guild_flags');
|
|
object['guild_is_muted_old'] = value('guild_is_muted');
|
|
object['guild_suppress_roles_old'] = value('guild_suppress_roles');
|
|
object['guild_notify_highlights_old'] = value('guild_notify_highlights');
|
|
object['guild_suppress_everyone_old'] = value('guild_suppress_everyone');
|
|
object['guild_receive_mobile_push_old'] = value('guild_receive_mobile_push');
|
|
object['guild_scheduled_events_muted_old'] = value('guild_scheduled_events_muted');
|
|
value = value('guild_message_notification_settings');
|
|
object['guild_message_notification_settings_old'] = value;
|
|
object['is_opt_in_only_change'] = value6 === value8;
|
|
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object]);
|
|
function trackGuildNotificationSettingsUpdateCompute(a0) { // fn#52200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:4019, owner: trackGuildNotificationSettingsUpdate.compute, offset: 0x013224cc, size: 295 bytes, params: 2, frame: 15
|
|
var r5;
|
|
var end_time;
|
|
var Date;
|
|
var date;
|
|
const value = a1;
|
|
const r1 = value !== undefined ? value : {};
|
|
if (r1.mute_config == null) {
|
|
r5 = a0.guild_muted_until;
|
|
} else {
|
|
end_time = r1.mute_config.end_time;
|
|
if (end_time != null) {
|
|
Date = global.Date;
|
|
end_time = r1.mute_config.end_time;
|
|
date = new Date();
|
|
date = date.getTime();
|
|
r5 = date;
|
|
} else {
|
|
r5 = a0.guild_muted_until;
|
|
}
|
|
}
|
|
return {guild_muted_until: r5, guild_flags: r1.flags ?? a0.guild_flags,
|
|
guild_is_muted: r1.muted ?? a0.guild_is_muted,
|
|
guild_message_notification_settings: r1.message_notifications != null ? env1_14[r1.message_notifications] : a0.guild_message_notification_settings,
|
|
guild_suppress_roles: r1.suppress_roles ?? a0.guild_suppress_roles,
|
|
guild_receive_mobile_push: r1.mobile_push ?? a0.guild_receive_mobile_push,
|
|
guild_notify_highlights: r1.notify_highlights ?? a0.guild_notify_highlights,
|
|
guild_suppress_everyone: r1.suppress_everyone ?? a0.guild_suppress_everyone,
|
|
guild_scheduled_events_muted: r1.mute_scheduled_events ?? a0.guild_scheduled_events_muted};
|
|
}
|
|
|
|
}
|
|
|
|
function trackChannelNotificationSettingsUpdate({updateType = NotificationSettingsUpdateType.CHANNEL, guildId, channelId, applicationId, change, previous, label, location}) { // fn#52201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5783, offset: 0x013225f3, size: 548 bytes, params: 2, frame: 30
|
|
const trackChannelNotificationSettingsUpdateCompute2 = trackChannelNotificationSettingsUpdateCompute;
|
|
const value3 = trackChannelNotificationSettingsUpdateCompute2(previous);
|
|
const value5 = trackChannelNotificationSettingsUpdateCompute2(getCurrentChannelSettings(guildId, channelId), change);
|
|
const value6 = differ(value3, value5, 'RETURN_PREVIOUS_WHEN_CHANGED');
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
const value11 = (value5.channel_flags ?? 0) ^ (value6('channel_flags') ?? 0);
|
|
const removeFlags = FlagUtilsModule.removeFlags;
|
|
const FAVORITED = ChannelNotificationSettingsFlags.FAVORITED;
|
|
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
|
|
const value12 = Reflect.apply(removeFlags, FlagUtilsModule, [value11, FAVORITED, OPT_IN_ENABLED]);
|
|
const r7 = MessageStore.getLastMessage(channelId)?.type ?? null;
|
|
const defaultImport = AppAnalyticsUtils;
|
|
const trackWithMetadata = defaultImport.trackWithMetadata;
|
|
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
|
|
const object = {};
|
|
copyDataProperties(object, value5, undefined);
|
|
const lastMentionTimestampStoreBinding = LastMentionTimestampStore;
|
|
const getStats = lastMentionTimestampStoreBinding.getStats;
|
|
copyDataProperties(object, Reflect.apply(getStats, lastMentionTimestampStoreBinding, [guildId]), undefined);
|
|
object['location'] = location;
|
|
object['guild_id'] = guildId;
|
|
object['channel_id'] = channelId;
|
|
object['update_type'] = updateType;
|
|
object['label'] = label;
|
|
object['parent_id'] = channel != null ? channel.parent_id : null;
|
|
object['channel_flags_old'] = value6('channel_flags');
|
|
object['channel_is_muted_old'] = value6('channel_is_muted');
|
|
object['channel_muted_until_old'] = value6('channel_muted_until');
|
|
object['channel_is_overridden_old'] = value6('channel_is_overridden');
|
|
object['channel_message_notification_settings_old'] = value6('channel_message_notification_settings');
|
|
object['is_opt_in_only_change'] = value12 === 0;
|
|
object['last_message_type'] = r7;
|
|
object['application_id'] = applicationId;
|
|
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object]);
|
|
function trackChannelNotificationSettingsUpdateCompute(a0) { // fn#52202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5946, owner: trackChannelNotificationSettingsUpdate.compute, offset: 0x01322817, size: 196 bytes, params: 2, frame: 17
|
|
let value = a1;
|
|
const value2 = undefined;
|
|
const r1 = value !== value2 ? value : {};
|
|
const muted = r1.muted;
|
|
value = null;
|
|
const r8 = value != muted ? muted : value == a0 ? value2 : a0.channel_is_muted;
|
|
const r2 = value != r1.message_notifications ? env1_14[r1.message_notifications] : value == a0 ? value2 : a0.channel_message_notification_settings;
|
|
const object = {channel_is_muted: r8};
|
|
object.channel_is_overridden = value == guildId ? value : r8 === true || value != r2;
|
|
const flags = r1.flags;
|
|
object.channel_flags = value != flags ? flags : value == a0 ? value2 : a0.channel_flags;
|
|
object.channel_message_notification_settings = r2;
|
|
value = environment.__proto__;
|
|
object.channel_muted_until = muteConfigToTimestamp(r1.mute_config);
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function getManyCurrentGuildSettings(a0) { // fn#52203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7289, offset: 0x013228db, size: 54 bytes, params: 2, frame: 12
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
a0.forEach(_fun52204);
|
|
return map;
|
|
function _fun52204(a0) { // fn#52204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7361, offset: 0x01322911, size: 37 bytes, params: 2, frame: 14
|
|
const binding = env0_0;
|
|
return binding.set(a0, getCurrentGuildSettings(a0));
|
|
}
|
|
|
|
}
|
|
|
|
function getManyCurrentChannelSettings(a0, a1) { // fn#52205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7491, offset: 0x01322936, size: 61 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
a1.forEach(_fun52206);
|
|
return map;
|
|
function _fun52206(a0) { // fn#52206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7567, offset: 0x01322973, size: 42 bytes, params: 2, frame: 15
|
|
const binding = env0_1;
|
|
return binding.set(a0, getCurrentChannelSettings(env0_0, a0));
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun52182, 6610, [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683,
|
|
2]) /* metro module 6610, dependencies: [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683, 2] */;
|