/* Metro module 14769; source: actions/MentionActionCreators.tsx; dependencies: [661, 694, 507, 2] */ import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as HTTPUtilsModule from '../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ function _fun111490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:6, offset: 0x023a4704, size: 211 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = {setGuildFilter: setGuildFilter, clearMentions: clearMentions, truncateMentions: truncateMentions, fetchRecentMentions: fetchRecentMentions, deleteRecentMention: deleteRecentMention, setRecentMentionsStale: setRecentMentionsStale}; (FileImportTrackerModule).fileFinishedImporting('actions/MentionActionCreators.tsx'); exports.default = object; function setGuildFilter({guildFilter, roleFilter, everyoneFilter}) { // fn#111491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:150, offset: 0x023a47d7, size: 83 bytes, params: 2, frame: 16 Dispatcher.dispatch({type: 'SET_RECENT_MENTIONS_FILTER', guildFilter: guildFilter, roleFilter: roleFilter, everyoneFilter: everyoneFilter}); } function clearMentions() { // fn#111492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:311, offset: 0x023a482a, size: 49 bytes, params: 1, frame: 13 (Dispatcher).dispatch({type: 'CLEAR_MENTIONS'}); } function truncateMentions(a0) { // fn#111493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:370, offset: 0x023a485b, size: 56 bytes, params: 2, frame: 13 (Dispatcher).dispatch({type: 'TRUNCATE_MENTIONS', size: a0}); } function fetchRecentMentions({before, limit, guildId, roles, everyone, feature}) { // fn#111494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:463, offset: 0x023a4893, size: 247 bytes, params: 2, frame: 23 const r9 = limit !== undefined ? limit : MAX_MENTIONS_PER_FETCH; guildId = guildId === undefined ? null : guildId; roles = roles === undefined || roles; everyone = everyone === undefined || everyone; (Dispatcher).dispatch({type: 'LOAD_RECENT_MENTIONS', guildId: guildId}); const HTTP = (HTTPUtilsModule).HTTP; const get = HTTP.get; const MENTIONS = Endpoints.MENTIONS; return Reflect.apply(get, HTTP, [{'url': null, 'query': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true, url: MENTIONS, query: {before: before, limit: r9, guild_id: guildId, roles: roles, everyone: everyone, feature: feature}}]).then(function({body}) { var defaultImport = importDefault(dependencyMap[1]); var object = {type: 'LOAD_RECENT_MENTIONS_SUCCESS', messages: body}; object.isAfter = before != null; body = body.length; object.hasMoreAfter = body >= MAX_MENTIONS_PER_FETCH; defaultImport.dispatch(object); }, _fun111496); function _fun111496() { // fn#111496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:872, offset: 0x023a49ea, size: 49 bytes, params: 1, frame: 13 const value = environment.__proto__; (Dispatcher).dispatch({type: 'LOAD_RECENT_MENTIONS_FAILURE'}); } } function deleteRecentMention(a0) { // fn#111497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:937, offset: 0x023a4a1b, size: 119 bytes, params: 2, frame: 17 const HTTP = (HTTPUtilsModule).HTTP; const del = HTTP.del; const object = {'url': null, 'retries': 2, 'oldFormErrors': true, 'rejectWithError': true}; object.url = Endpoints.MENTIONS_MESSAGE_ID(a0); Reflect.apply(del, HTTP, [object]); (Dispatcher).dispatch({type: 'RECENT_MENTION_DELETE', id: a0}); } function setRecentMentionsStale() { // fn#111498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14966:1110, offset: 0x023a4a92, size: 49 bytes, params: 1, frame: 13 (Dispatcher).dispatch({type: 'SET_RECENT_MENTIONS_STALE'}); } } global.__d(_fun111490, 14769, [661, 694, 507, 2]) /* metro module 14769, dependencies: [661, 694, 507, 2] */;