2026-07-25 08:10:48 +00:00
// Module ID: 4350
// Function ID: 38490
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 57, 5, 1910, 4351, 1922, 1194, 1348, 4803, 1908, 1918, 1838, 3759, 3768, 1907, 3948, 1850, 653, 3, 21, 4804, 4809, 1883, 4807, 4352, 1360, 22, 5834, 4361, 3770, 6093, 12754, 9925, 1882, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 4350 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import closure_6 from "_isNativeReflectConstruct" ;
import closure_7 from "_isNativeReflectConstruct" ;
import _slicedToArray from "_slicedToArray" ;
import closure_9 from "_slicedToArray" ;
import closure_10 from "_isNativeReflectConstruct" ;
import closure_11 from "_isNativeReflectConstruct" ;
import closure_12 from "_isNativeReflectConstruct" ;
import closure_13 from "_isNativeReflectConstruct" ;
import closure_14 from "_isNativeReflectConstruct" ;
import closure_15 from "_isNativeReflectConstruct" ;
import closure_16 from "_isNativeReflectConstruct" ;
import closure_17 from "_isNativeReflectConstruct" ;
import closure_18 from "_createForOfIteratorHelperLoose" ;
import closure_19 from "_isNativeReflectConstruct" ;
import closure_20 from "_isNativeReflectConstruct" ;
import closure_21 from "_isNativeReflectConstruct" ;
import closure_22 from "_isNativeReflectConstruct" ;
import closure_23 from "_isNativeReflectConstruct" ;
import ME from "ME" ;
import importDefaultResult from "_getPrototypeOf" ;
import set from "_possibleConstructorReturn" ;
let closure_24 ;
let closure_25 ;
let closure_26 ;
let closure_27 ;
let closure_28 ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
function reinjectEphemerals ( channelId , truncateResult ) {
2026-07-23 10:11:24 +00:00
let closure_0 = truncateResult ;
2026-07-20 16:05:17 +00:00
if ( truncateResult . hasMoreAfter ) {
return truncateResult ;
} else {
2026-07-23 10:11:24 +00:00
messages = messages . getMessages ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( 0 === messages . length ) {
return truncateResult ;
} else {
2026-07-23 10:11:24 +00:00
const found = messages . filter ( ( id ) = > ! truncateResult . has ( id . id ) ) ;
2026-07-20 16:05:17 +00:00
let mutation = truncateResult ;
if ( 0 !== found . length ) {
mutation = truncateResult . mutate ( ( _merge ) = > {
_merge . _merge ( found ) ;
const _array = _merge . _array ;
2026-07-23 10:11:24 +00:00
const sorted = _array . sort ( ( id , id2 ) = > found ( outer2_2 [ 23 ] ) . compare ( id . id , id2 . id ) ) ;
2026-07-20 16:05:17 +00:00
} , true ) ;
}
return mutation ;
}
}
}
function handleConnectionOpen() {
2026-07-25 08:10:48 +00:00
const item = importDefault ( 4804 ) . forEach ( ( mutate ) = > {
2026-07-23 10:11:24 +00:00
outer1_1 ( outer1_2 [ 24 ] ) . commit ( mutate . mutate ( { ready : false , loadingMore : false } ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
set . clear ( ) ;
}
2026-07-23 10:11:24 +00:00
async function _addPushNotificationMessageIfNotCached ( arg0 , arg1 , arg2 , arg3 ) {
const databaseResult = outer2_1 ( outer2_2 [ 26 ] ) . database ( ) ;
const basicChannel = outer2_14 . getBasicChannel ( arg0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != databaseResult ) {
if ( null != basicChannel ) {
2026-07-23 10:11:24 +00:00
const obj2 = outer2_1 ( outer2_2 [ 26 ] ) ;
const messagesResult = outer2_1 ( outer2_2 [ 26 ] ) . messages ( databaseResult ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
outer2_30 . log ( "Push notification message not in cache, adding directly" , arg1 . id , arg1 . channel_id ) ;
const obj = outer2_1 ( outer2_2 [ 26 ] ) ;
2026-07-20 16:05:17 +00:00
const tmp = arg0 ;
2026-07-23 10:11:24 +00:00
const orCreate = outer2_1 ( outer2_2 [ 24 ] ) . getOrCreate ( arg0 ) ;
const obj4 = outer2_1 ( outer2_2 [ 24 ] ) ;
outer2_1 ( outer2_2 [ 24 ] ) . commit ( orCreate . receivePushNotification ( arg1 , arg2 ) ) ;
outer2_32 . emitChange ( ) ;
2026-07-20 16:05:17 +00:00
}
function receiveMediaMentionMessage ( message ) {
const media_mention = message . media_mention ;
let message_id ;
if ( null != media_mention ) {
message_id = media_mention . message_id ;
}
if ( null != message_id ) {
const attachment_id = message . media_mention . attachment_id ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( attachment_id ) ;
2026-07-20 16:05:17 +00:00
let obj = { } ;
const merged = Object . assign ( message ) ;
obj [ "channel_id" ] = attachment_id ;
obj [ "type" ] = constants3 . MEDIA_MENTION_MESSAGE ;
obj [ "id" ] = message . media_mention . message_id ;
obj = { channel_id : message.channel_id , message_id : message.media_mention.message_id , type : constants . DEFAULT } ;
2026-07-23 10:11:24 +00:00
channel = channel . getChannel ( message . channel_id ) ;
2026-07-20 16:05:17 +00:00
let guild_id ;
if ( null != channel ) {
guild_id = channel . guild_id ;
}
obj . guild_id = guild_id ;
obj [ "message_reference" ] = obj ;
2026-07-25 08:10:48 +00:00
const obj4 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const obj1 = { ready : true } ;
const mutation = orCreate . receiveMessage ( obj , false ) . mutate ( obj1 ) ;
const receiveMessageResult = orCreate . receiveMessage ( obj , false ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( mutation ) ;
const obj3 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
}
function cleanMediaMention ( orCreate ) {
if ( null != orCreate ) {
const mediaMention2 = orCreate . mediaMention ;
let attachment_id ;
if ( null != mediaMention2 ) {
attachment_id = mediaMention2 . attachment_id ;
}
if ( null != attachment_id ) {
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( attachment_id ) ;
2026-07-20 16:05:17 +00:00
if ( null != value ) {
const mediaMention = orCreate . mediaMention ;
let message_id ;
if ( null != mediaMention ) {
message_id = mediaMention . message_id ;
}
if ( null != message_id ) {
const removeResult = value . remove ( message_id ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( removeResult ) ;
const obj3 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
function handleCleanup() {
2026-07-25 08:10:48 +00:00
const item = importDefault ( 4804 ) . forEach ( ( channelId ) = > {
2026-07-20 16:05:17 +00:00
channelId = channelId . channelId ;
2026-07-23 10:11:24 +00:00
if ( null == outer1_14 . getChannel ( channelId ) ) {
outer1_1 ( outer1_2 [ 24 ] ) . clear ( channelId ) ;
const obj = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
}
} ) ;
}
function handleRelationshipUpdate() {
2026-07-23 10:11:24 +00:00
let c0 = false ;
2026-07-25 08:10:48 +00:00
const item = importDefault ( 4804 ) . forEach ( ( reset ) = > {
2026-07-23 10:11:24 +00:00
outer1_1 ( outer1_2 [ 24 ] ) . commit ( reset . reset ( reset . map ( ( blocked ) = > {
2026-07-20 16:05:17 +00:00
let result = blocked ;
2026-07-23 10:11:24 +00:00
if ( blocked . blocked !== outer2_20 . isBlockedForMessage ( blocked ) ) {
let outer1_0 = true ;
result = blocked . set ( "blocked" , outer2_20 . isBlockedForMessage ( blocked ) ) ;
2026-07-20 16:05:17 +00:00
}
let result1 = result ;
2026-07-23 10:11:24 +00:00
if ( result . ignored !== outer2_20 . isIgnoredForMessage ( result ) ) {
outer1_0 = true ;
result1 = result . set ( "ignored" , outer2_20 . isIgnoredForMessage ( result ) ) ;
2026-07-20 16:05:17 +00:00
}
return result1 ;
} ) ) ) ;
} ) ;
2026-07-23 10:11:24 +00:00
return c0 ;
2026-07-20 16:05:17 +00:00
}
function performAuthorUpdate ( guildId ) {
2026-07-23 10:11:24 +00:00
let closure_0 = guildId ;
2026-07-25 08:10:48 +00:00
let item = importDefault ( 4804 ) . forEach ( ( channelId ) = > {
2026-07-23 10:11:24 +00:00
const channel = outer1_14 . getChannel ( channelId . channelId ) ;
2026-07-20 16:05:17 +00:00
let guild_id ;
if ( null != channel ) {
guild_id = channel . guild_id ;
}
2026-07-23 10:11:24 +00:00
if ( guild_id === items ) {
items = [ ] ;
let c1 = false ;
2026-07-20 16:05:17 +00:00
const item = channelId . forEach ( ( nick ) = > {
let colorString ;
2026-07-23 10:11:24 +00:00
const messageAuthor = items ( outer2_2 [ 32 ] ) . getMessageAuthor ( nick ) ;
2026-07-20 16:05:17 +00:00
( { nick , colorString } = messageAuthor ) ;
if ( nick === nick . nick ) {
if ( colorString === nick . colorString ) {
items . push ( nick ) ;
}
}
2026-07-23 10:11:24 +00:00
let c1 = true ;
2026-07-20 16:05:17 +00:00
items . push ( nick . merge ( { nick , colorString } ) ) ;
} ) ;
2026-07-23 10:11:24 +00:00
if ( c1 ) {
outer1_1 ( outer1_2 [ 24 ] ) . commit ( channelId . reset ( items ) ) ;
const obj = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
} ) ;
}
function handleReaction ( optimistic ) {
let channelId ;
2026-07-23 10:11:24 +00:00
let asyncGeneratorStep ;
let dependencyMap ;
let importDefault ;
2026-07-20 16:05:17 +00:00
let messageId ;
let userId ;
2026-07-23 10:11:24 +00:00
const _require = optimistic ;
( { type : importDefault , emoji : dependencyMap , reactionType : asyncGeneratorStep } = optimistic ) ;
2026-07-20 16:05:17 +00:00
( { channelId , messageId , userId } = optimistic ) ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null == value ) {
return false ;
} else {
if ( obj3 . shouldApplyReaction ( optimistic ) ) {
2026-07-23 10:11:24 +00:00
let _isNativeReflectConstruct = id . getId ( ) === userId ;
2026-07-20 16:05:17 +00:00
const updateResult = value . update ( messageId , ( addReaction ) = > {
if ( "MESSAGE_REACTION_ADD" === closure_1 ) {
2026-07-23 10:11:24 +00:00
let addReactionResult = addReaction . addReaction ( closure_2 , _isNativeReflectConstruct , optimistic . colors , asyncGeneratorStep ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
addReactionResult = addReaction . removeReaction ( closure_2 , _isNativeReflectConstruct , asyncGeneratorStep ) ;
2026-07-20 16:05:17 +00:00
}
return addReactionResult ;
} ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
} else {
return false ;
}
2026-07-25 08:10:48 +00:00
obj3 = _require ( 3770 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
function handleMessageSendFailedAutomod ( arg0 ) {
let messageData ;
2026-07-23 10:11:24 +00:00
let require ;
( { type : require , messageData } = arg0 ) ;
2026-07-25 08:10:48 +00:00
const failedMessageId = require ( 6093 ) /* _isNativeReflectConstruct */ . getFailedMessageId ( messageData ) ;
const obj = require ( 6093 ) /* _isNativeReflectConstruct */ ;
const orCreate = importDefault ( 4804 ) . getOrCreate ( messageData . message . channelId ) ;
2026-07-20 16:05:17 +00:00
if ( orCreate . has ( failedMessageId ) ) {
const updateResult = orCreate . update ( failedMessageId , ( embeds ) = > {
embeds = embeds . embeds ;
let length ;
if ( null != embeds ) {
2026-07-23 10:11:24 +00:00
length = embeds . filter ( outer1_0 ( outer1_2 [ 35 ] ) . isNotAutomodEmbed ) . length ;
2026-07-20 16:05:17 +00:00
}
let result = embeds ;
if ( length > 0 ) {
result = embeds . set ( "embeds" , [ ] ) ;
}
let result1 = result ;
2026-07-23 10:11:24 +00:00
if ( "MESSAGE_SEND_FAILED_AUTOMOD" === closure_0 ) {
result1 = result . set ( "flags" , outer1_0 ( outer1_2 [ 29 ] ) . addFlag ( result . flags , outer1_24 . EPHEMERAL ) ) ;
const obj2 = outer1_0 ( outer1_2 [ 29 ] ) ;
2026-07-20 16:05:17 +00:00
}
return result1 ;
} ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
} else {
return false ;
}
2026-07-25 08:10:48 +00:00
let obj2 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
( { MessageFlags : closure_24 , MessageReferenceTypes : closure_25 , MessageStates : closure_26 , MessageTypes : closure_27 , Permissions : closure_28 } = ME ) ;
let set = new Set ( ) ;
2026-07-20 16:05:17 +00:00
importDefaultResult = new importDefaultResult ( "MessageStore" ) ;
2026-07-23 10:11:24 +00:00
let c31 = false ;
let tmp6 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class MessageStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_3 ( this , MessageStore ) ;
obj = outer1_6 ( MessageStore ) ;
tmp2 = outer1_5 ;
if ( outer1_33 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_6 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_6 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( MessageStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_13 , outer1_14 , outer1_15 , outer1_11 , outer1_16 , outer1_17 , outer1_18 , outer1_10 , outer1_12 , outer1_19 , outer1_20 , outer1_21 , outer1_22 , outer1_23 ) ;
const items = [ outer1_10 ] ;
2026-07-20 16:05:17 +00:00
this . syncWith ( items , ( ) = > {
} ) ;
}
} ;
2026-07-23 10:11:24 +00:00
let items = [ obj , , , , , , , , , , , , , , , ] ;
2026-07-20 16:05:17 +00:00
obj = {
key : "getMessages" ,
value ( channelId ) {
2026-07-23 10:11:24 +00:00
if ( outer1_10 . hasViewingRoles ( ) ) {
const channel = outer1_14 . getChannel ( channelId ) ;
2026-07-20 16:05:17 +00:00
let guildId ;
if ( null != channel ) {
guildId = channel . getGuildId ( ) ;
}
2026-07-23 10:11:24 +00:00
if ( outer1_10 . isViewingRoles ( guildId ) ) {
if ( ! outer1_19 . can ( outer1_28 . VIEW_CHANNEL , channel ) ) {
let tmp9 = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
const prototype = tmp9 . prototype ;
tmp9 = new tmp9 ( channelId ) ;
return tmp9 ;
}
}
}
2026-07-23 10:11:24 +00:00
return outer1_1 ( outer1_2 [ 24 ] ) . getOrCreate ( channelId ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getMessage" ,
value ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const orCreate = outer1_1 ( outer1_2 [ 24 ] ) . getOrCreate ( arg0 ) ;
2026-07-20 16:05:17 +00:00
return orCreate . get ( arg1 ) ;
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "getLastEditableMessage" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
const messages = this . getMessages ( arg0 ) ;
2026-07-23 10:11:24 +00:00
const tmp = outer1_1 ( outer1_2 [ 30 ] ) ;
const reversed = outer1_1 ( outer1_2 [ 30 ] ) ( messages . toArray ( ) ) . reverse ( ) ;
2026-07-20 16:05:17 +00:00
return reversed . find ( ( arg0 ) = > {
let id ;
if ( null != id ) {
id = id . id ;
}
2026-07-23 10:11:24 +00:00
return outer2_1 ( outer2_2 [ 36 ] ) ( arg0 , id ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
} ;
items [ 4 ] = {
key : "getLastChatCommandMessage" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
const messages = this . getMessages ( arg0 ) ;
const reversed = messages . toArray ( ) . reverse ( ) ;
return reversed . find ( ( interaction ) = > {
interaction = interaction . interaction ;
let type ;
if ( null != interaction ) {
type = interaction . type ;
}
2026-07-23 10:11:24 +00:00
let tmp2 = type === MessageStore ( outer2_2 [ 37 ] ) . InteractionTypes . APPLICATION_COMMAND ;
2026-07-20 16:05:17 +00:00
if ( tmp2 ) {
const interactionData = interaction . interactionData ;
let type1 ;
if ( null != interactionData ) {
type1 = interactionData . type ;
}
2026-07-23 10:11:24 +00:00
tmp2 = type1 === MessageStore ( outer2_2 [ 37 ] ) . ApplicationCommandType . CHAT ;
2026-07-20 16:05:17 +00:00
}
if ( tmp2 ) {
let id ;
2026-07-23 10:11:24 +00:00
if ( null != id ) {
id = id . id ;
2026-07-20 16:05:17 +00:00
}
tmp2 = interaction . interaction . user . id === id ;
}
return tmp2 ;
} ) ;
}
} ;
items [ 5 ] = {
key : "getLastMessage" ,
value ( arg0 ) {
const messages = this . getMessages ( arg0 ) ;
2026-07-23 10:11:24 +00:00
const tmp = outer1_1 ( outer1_2 [ 30 ] ) ;
const reversed = outer1_1 ( outer1_2 [ 30 ] ) ( messages . toArray ( ) ) . reverse ( ) ;
2026-07-20 16:05:17 +00:00
return reversed . get ( 0 ) ;
}
} ;
items [ 6 ] = {
key : "getLastNonCurrentUserMessage" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
const messages = this . getMessages ( arg0 ) ;
2026-07-23 10:11:24 +00:00
const tmp = outer1_1 ( outer1_2 [ 30 ] ) ;
const reversed = outer1_1 ( outer1_2 [ 30 ] ) ( messages . toArray ( ) ) . reverse ( ) ;
2026-07-20 16:05:17 +00:00
return reversed . find ( ( author ) = > {
let id ;
if ( null != id ) {
id = id . id ;
}
return author . author . id !== id ;
} ) ;
}
} ;
items [ 7 ] = {
key : "jumpedMessageId" ,
value ( arg0 ) {
let jumpTargetId ;
2026-07-23 10:11:24 +00:00
const value = outer1_1 ( outer1_2 [ 24 ] ) . get ( arg0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != value ) {
jumpTargetId = value . jumpTargetId ;
}
return jumpTargetId ;
}
} ;
items [ 8 ] = {
key : "focusedMessageId" ,
value ( arg0 ) {
let focusTargetId ;
2026-07-23 10:11:24 +00:00
const value = outer1_1 ( outer1_2 [ 24 ] ) . get ( arg0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != value ) {
focusTargetId = value . focusTargetId ;
}
return focusTargetId ;
}
} ;
items [ 9 ] = {
key : "hasPresent" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const value = outer1_1 ( outer1_2 [ 24 ] ) . get ( arg0 ) ;
const obj = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
return null != value && value . ready && value . hasPresent ( ) ;
}
} ;
items [ 10 ] = {
key : "isReady" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_1 ( outer1_2 [ 24 ] ) . getOrCreate ( arg0 ) . ready ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 11 ] = {
key : "whenReady" ,
value ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
const self = this ;
let closure_1 = arg0 ;
let closure_2 = arg1 ;
2026-07-20 16:05:17 +00:00
const result = this . addConditionalChangeListener ( ( ) = > {
2026-07-23 10:11:24 +00:00
if ( self . isReady ( closure_1 ) ) {
2026-07-20 16:05:17 +00:00
const _setImmediate = setImmediate ;
2026-07-23 10:11:24 +00:00
setImmediate ( closure_2 ) ;
2026-07-20 16:05:17 +00:00
return false ;
}
} ) ;
}
} ;
items [ 12 ] = {
key : "isLoadingMessages" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_1 ( outer1_2 [ 24 ] ) . getOrCreate ( arg0 ) . loadingMore ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 13 ] = {
key : "hasCurrentUserSentMessage" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
const messages = this . getMessages ( arg0 ) ;
return null != messages . findNewest ( ( author ) = > {
let id ;
if ( null != id ) {
id = id . id ;
}
return author . author . id === id ;
} ) ;
}
} ;
items [ 14 ] = {
key : "hasCurrentUserSentWaveBlockingMessage" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
const messages = this . getMessages ( arg0 ) ;
return null != messages . findNewest ( ( type ) = > {
2026-07-23 10:11:24 +00:00
let tmp = type . type !== outer2_27 . FRIEND_REQUEST_ACCEPTED ;
2026-07-20 16:05:17 +00:00
if ( tmp ) {
let id ;
if ( null != id ) {
id = id . id ;
}
tmp = type . author . id === id ;
}
return tmp ;
} ) ;
}
} ;
items [ 15 ] = {
key : "hasCurrentUserSentMessageSinceAppStart" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_31 ;
2026-07-20 16:05:17 +00:00
}
} ;
return callback ( MessageStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp6 . displayName = "MessageStore" ;
2026-07-23 10:11:24 +00:00
tmp6 = new tmp6 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
BACKGROUND_SYNC_CHANNEL_MESSAGES : function handleBackgroundSyncChannelMessages ( changesByChannelId ) {
changesByChannelId = changesByChannelId . changesByChannelId ;
for ( const key10015 in changesByChannelId ) {
2026-07-23 10:11:24 +00:00
let tmp12 = importDefault ;
let tmp13 = dependencyMap ;
2026-07-20 16:05:17 +00:00
let tmp11 = key10015 ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
let value = obj . get ( key10015 ) ;
if ( null == value ) {
continue ;
} else {
2026-07-23 10:11:24 +00:00
let tmp = require ;
let tmp2 = dependencyMap ;
2026-07-25 08:10:48 +00:00
let _default = require ( 4809 ) /* _isNativeReflectConstruct */ . default ;
2026-07-20 16:05:17 +00:00
let isConnectedResult = _default . isConnected ( ) ;
if ( ! value . cached ) {
if ( isConnectedResult ) {
2026-07-23 10:11:24 +00:00
let tmp4 = importDefaultResult ;
2026-07-20 16:05:17 +00:00
let _HermesInternal = HermesInternal ;
let str = "Skipping background message sync for " ;
let tmp5 = key10015 ;
let str2 = " cached:" ;
let str3 = " ready:" ;
let str4 = " hasMoreAfter:" ;
let str5 = " isConnected:" ;
let tmp6 = isConnectedResult ;
2026-07-23 10:11:24 +00:00
let logResult = importDefaultResult . log ( "Skipping background message sync for " + tmp11 + " cached:" + value . cached + " ready:" + value . ready + " hasMoreAfter:" + value . hasMoreAfter + " isConnected:" + isConnectedResult ) ;
2026-07-20 16:05:17 +00:00
let tmp8 = isConnectedResult ;
2026-07-23 10:11:24 +00:00
continue ;
2026-07-20 16:05:17 +00:00
}
continue ;
}
let mergeDeltaResult = value . mergeDelta ( changesByChannelId [ key10015 ] . new_messages , changesByChannelId [ key10015 ] . modified_messages , changesByChannelId [ key10015 ] . deleted_message_ids ) ;
let tmp10 = isConnectedResult ;
continue ;
}
continue ;
}
} ,
CONNECTION_OPEN : handleConnectionOpen ,
OVERLAY_INITIALIZE : handleConnectionOpen ,
CACHE_LOADED : function handleCacheLoaded ( messages ) {
let done ;
2026-07-23 10:11:24 +00:00
const tmp = _createForOfIteratorHelperLoose ( importDefault ( 21 ) . entries ( messages . messages ) ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp ( ) ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp2 = callback3 ;
let tmp3 = callback3 ( iter . value , 2 ) ;
let tmp4 = importDefault ;
let tmp5 = dependencyMap ;
2026-07-25 08:10:48 +00:00
let obj2 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
let orCreate = obj2 . getOrCreate ( tmp3 [ 0 ] ) ;
let addCachedMessagesResult = orCreate . addCachedMessages ( tmp3 [ 1 ] , true ) ;
2026-07-25 08:10:48 +00:00
let obj4 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
let commitResult = obj4 . commit ( addCachedMessagesResult ) ;
let iter2 = tmp ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
} ,
LOAD_MESSAGES : function handleLoadMessages() {
return true ;
} ,
LOAD_MESSAGES_SUCCESS : function handleLoadMessagesSuccess ( arg0 ) {
let avoidInitialScroll ;
let channelId ;
let done ;
let hasMoreAfter ;
let hasMoreBefore ;
let isAfter ;
let isBefore ;
let isStale ;
let jump ;
let messages ;
let truncate ;
( { channelId , isBefore , isAfter , messages } = arg0 ) ;
( { jump , hasMoreBefore , hasMoreAfter , isStale , truncate , avoidInitialScroll } = arg0 ) ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId ) ;
2026-07-20 16:05:17 +00:00
const complete = orCreate . loadComplete ( { newMessages : messages , isBefore , isAfter , jump , hasMoreBefore , hasMoreAfter , cached : isStale , hasFetched : true , avoidInitialScroll } ) ;
let tmp = null == truncate ;
if ( ! tmp ) {
tmp = ! isBefore && ! isAfter ;
const tmp2 = ! isBefore && ! isAfter ;
}
if ( ! tmp ) {
let tmp3 = isBefore ;
if ( isBefore ) {
tmp3 = isAfter ;
}
tmp = tmp3 ;
}
let truncateResult = complete ;
if ( ! tmp ) {
truncateResult = complete . truncate ( isBefore , isAfter ) ;
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const tmp5 = reinjectEphemerals ( channelId , truncateResult ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( tmp5 ) ;
2026-07-20 16:05:17 +00:00
const tmp7 = _createForOfIteratorHelperLoose ( messages ) ;
let iter = tmp7 ( ) ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp8 = receiveMediaMentionMessage ;
let tmp9 = receiveMediaMentionMessage ( iter . value ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp7 ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
} ,
LOAD_MESSAGES_FAILURE : function handleLoadMessagesFailure ( channelId ) {
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId . channelId ) ;
const obj = importDefault ( 4804 ) ;
importDefault ( 4804 ) . commit ( orCreate . mutate ( { loadingMore : false , error : true } ) ) ;
2026-07-20 16:05:17 +00:00
} ,
LOAD_MESSAGES_SUCCESS_CACHED : function handleLoadMessagesSuccessCached ( truncate ) {
let after ;
let before ;
let channelId ;
let focus ;
let jump ;
let limit ;
( { channelId , jump , focus , before , after , limit } = truncate ) ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj . getOrCreate ( channelId ) ;
if ( null != jump ) {
if ( jump . present ) {
let jumpToPresentResult = orCreate . jumpToPresent ( limit ) ;
}
let tmp4 = null == truncate . truncate ;
if ( ! tmp4 ) {
tmp4 = null == before && null == after ;
const tmp5 = null == before && null == after ;
}
if ( ! tmp4 ) {
tmp4 = null != before && null != after ;
const tmp6 = null != before && null != after ;
}
let truncateResult = jumpToPresentResult ;
if ( ! tmp4 ) {
truncateResult = jumpToPresentResult . truncate ( null != before , null != after ) ;
}
const tmp9 = reinjectEphemerals ( channelId , truncateResult ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( tmp9 ) ;
2026-07-20 16:05:17 +00:00
}
let messageId ;
if ( null != focus ) {
messageId = focus . messageId ;
}
if ( null != messageId ) {
jumpToPresentResult = orCreate . focusOnMessage ( focus . messageId ) ;
} else {
let messageId1 ;
if ( null != jump ) {
messageId1 = jump . messageId ;
}
if ( null != messageId1 ) {
obj = { } ;
( { messageId : obj4.messageId , flash : obj4.flash , offset : obj4.offset , returnMessageId : obj4.returnTargetId , jumpType : obj4.jumpType , onJumpComplete : obj4.onJumpComplete } = jump ) ;
jumpToPresentResult = orCreate . jumpToMessage ( obj ) ;
} else {
jumpToPresentResult = orCreate ;
if ( ! tmp3 ) {
jumpToPresentResult = orCreate . loadFromCache ( null != before , limit ) ;
}
2026-07-23 10:11:24 +00:00
tmp3 = null == before && null == after ;
2026-07-20 16:05:17 +00:00
}
}
} ,
LOCAL_MESSAGES_LOADED : function handleLocalMessagesLoaded ( channelId ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj . getOrCreate ( channelId . channelId ) ;
const addCachedMessagesResult = orCreate . addCachedMessages ( channelId . messages , channelId . stale ) ;
let isForegroundCacheLoad = channelId . isForegroundCacheLoad ;
if ( isForegroundCacheLoad ) {
isForegroundCacheLoad = channelId . messages . length > 0 ;
}
if ( isForegroundCacheLoad ) {
isForegroundCacheLoad = null == addCachedMessagesResult . jumpTargetId ;
}
let mutation = addCachedMessagesResult ;
if ( isForegroundCacheLoad ) {
obj = { initialScrollSequenceId : addCachedMessagesResult.initialScrollSequenceId + 1 , suppressRowAnimationSequenceId : addCachedMessagesResult.suppressRowAnimationSequenceId + 1 } ;
mutation = addCachedMessagesResult . mutate ( obj ) ;
}
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( mutation ) ;
2026-07-20 16:05:17 +00:00
} ,
LOAD_MESSAGE_INTERACTION_DATA_SUCCESS : function handleLoadMessageInteractionDataSuccess ( messageId ) {
2026-07-23 10:11:24 +00:00
let closure_0 = messageId ;
2026-07-20 16:05:17 +00:00
messageId = messageId . messageId ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( messageId . channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null != value ) {
if ( value . has ( messageId ) ) {
2026-07-23 10:11:24 +00:00
const updateResult = value . update ( messageId , ( set ) = > set . set ( "interactionData" , messageId . interactionData ) ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
}
}
return false ;
} ,
TRUNCATE_MESSAGES : function handleTruncateMessages ( arg0 ) {
let channelId ;
let truncateBottom ;
let truncateTop ;
( { channelId , truncateBottom , truncateTop } = arg0 ) ;
importDefaultResult . log ( "Truncating messages for " + channelId + " bottom:" + truncateBottom + " top:" + truncateTop ) ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId ) ;
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const truncateResult = orCreate . truncate ( truncateBottom , truncateTop ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( truncateResult ) ;
2026-07-20 16:05:17 +00:00
} ,
CLEAR_MESSAGES : function handleClearMessages ( channelId ) {
channelId = channelId . channelId ;
importDefaultResult . log ( "Clearing messages for " + channelId ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . clear ( channelId ) ;
2026-07-20 16:05:17 +00:00
set . clear ( ) ;
} ,
MESSAGE_CREATE : function handleIncomingMessage ( arg0 ) {
let channelId ;
let isPushNotification ;
let message ;
let optimistic ;
( { channelId , message } = arg0 ) ;
( { optimistic , isPushNotification } = arg0 ) ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId ) ;
const obj = importDefault ( 4804 ) ;
const isConnectedResult = require ( 4809 ) /* _isNativeReflectConstruct */ . default . isConnected ( ) ;
2026-07-20 16:05:17 +00:00
if ( isPushNotification ) {
if ( obj5 . isIOSPushNotificationRawPayloadFixExperimentEnabled ( ) ) {
2026-07-23 10:11:24 +00:00
( function addPushNotificationMessageIfNotCached ( channelId , message , isConnectedResult ) {
return outer1_37 ( . . . arguments ) ;
} ) ( channelId , message , isConnectedResult ) ;
2026-07-20 16:05:17 +00:00
} else {
importDefaultResult . log ( "Inserting message tapped on from a push notification" , message . id , message . channel_id ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( orCreate . receivePushNotification ( message , isConnectedResult ) ) ;
const obj6 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
obj5 = require ( 4807 ) /* isIOSPushNotificationRawPayloadFixExperimentEnabled */ ;
2026-07-20 16:05:17 +00:00
} else {
let tmp3 = ! tmp2 ;
if ( ! ! orCreate . ready ) {
const tmp4 = ! optimistic || ! orCreate . has ( message . id ) ;
if ( tmp4 ) {
let hasItem = null != message . nonce ;
if ( hasItem ) {
hasItem = message . state !== constants2 . SENDING ;
}
if ( hasItem ) {
hasItem = set . has ( message . nonce ) ;
}
let removeResult = orCreate ;
if ( hasItem ) {
removeResult = orCreate . remove ( message . nonce ) ;
set . delete ( message . nonce ) ;
}
const receiveMessageResult = removeResult . receiveMessage ( message , true === atBottom . isAtBottom ( channelId ) ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( receiveMessageResult ) ;
2026-07-20 16:05:17 +00:00
receiveMediaMentionMessage ( message ) ;
2026-07-25 08:10:48 +00:00
const obj4 = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
}
tmp3 = tmp4 ;
}
return tmp3 ;
}
} ,
MESSAGE_SEND_FAILED : function handleSendFailed ( channelId ) {
let messageId ;
2026-07-23 10:11:24 +00:00
let require ;
( { messageId , reason : require } = channelId ) ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId . channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null != orCreate ) {
if ( orCreate . has ( messageId ) ) {
const value = orCreate . get ( messageId , true ) ;
let isPollResult ;
if ( null != value ) {
isPollResult = value . isPoll ( ) ;
}
if ( true === isPollResult ) {
let removeResult = orCreate . remove ( messageId ) ;
} else {
removeResult = orCreate . update ( messageId , ( set ) = > {
2026-07-23 10:11:24 +00:00
const result = set . set ( "state" , outer1_26 . SEND_FAILED ) ;
2026-07-20 16:05:17 +00:00
if ( result . isCommandType ( ) ) {
let str3 = "" ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
str3 = closure_0 ;
2026-07-20 16:05:17 +00:00
}
const result1 = result . set ( "interactionError" , str3 ) ;
2026-07-23 10:11:24 +00:00
let result2 = result1 . set ( "flags" , outer1_0 ( outer1_2 [ 29 ] ) . addFlag ( result1 . flags , outer1_24 . EPHEMERAL ) ) ;
const obj3 = outer1_0 ( outer1_2 [ 29 ] ) ;
2026-07-20 16:05:17 +00:00
} else {
result2 = result ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
2026-07-20 16:05:17 +00:00
let str = "" ;
2026-07-23 10:11:24 +00:00
if ( null != closure_0 ) {
str = closure_0 ;
2026-07-20 16:05:17 +00:00
}
result2 = result . set ( "interactionError" , str ) ;
}
}
return result2 ;
} ) ;
}
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( removeResult ) ;
2026-07-20 16:05:17 +00:00
}
}
return false ;
} ,
MESSAGE_SEND_FAILED_AUTOMOD : handleMessageSendFailedAutomod ,
MESSAGE_EDIT_FAILED_AUTOMOD : handleMessageSendFailedAutomod ,
MESSAGE_UPDATE : function handleMessageUpdate ( message ) {
2026-07-23 10:11:24 +00:00
let closure_0 = message ;
2026-07-20 16:05:17 +00:00
const id = message . message . id ;
2026-07-25 08:10:48 +00:00
let orCreate = importDefault ( 4804 ) . getOrCreate ( message . message . channel_id ) ;
2026-07-20 16:05:17 +00:00
if ( null != orCreate ) {
if ( orCreate . has ( id ) ) {
2026-07-23 10:11:24 +00:00
let updateResult = orCreate . update ( id , ( message ) = > message ( outer1_2 [ 28 ] ) . updateMessageRecord ( message , message . message ) ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-23 10:11:24 +00:00
( function handleMediaMentionMessageUpdate ( message ) {
let closure_0 = message ;
2026-07-20 16:05:17 +00:00
const media_mention = message . media_mention ;
let message_id ;
if ( null != media_mention ) {
message_id = media_mention . message_id ;
}
if ( null != message_id ) {
if ( "content" in message ) {
2026-07-23 10:11:24 +00:00
const orCreate = outer1_1 ( outer1_2 [ 24 ] ) . getOrCreate ( message . media_mention . attachment_id ) ;
let obj = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
const updateResult = orCreate . update ( message . media_mention . message_id , ( message ) = > {
2026-07-23 10:11:24 +00:00
let obj = message ( outer2_2 [ 28 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { content : message.content } ;
return obj . updateMessageRecord ( message , obj ) ;
} ) ;
2026-07-23 10:11:24 +00:00
outer1_1 ( outer1_2 [ 24 ] ) . commit ( updateResult ) ;
const obj3 = outer1_1 ( outer1_2 [ 24 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
} ) ( message . message ) ;
2026-07-20 16:05:17 +00:00
}
}
return false ;
} ,
MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT : function handleMessageExplicitContentScanTimeout ( messageId ) {
messageId = messageId . messageId ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( messageId . channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null != value ) {
if ( value . has ( messageId ) ) {
2026-07-25 08:10:48 +00:00
const updateResult = value . update ( messageId , require ( 5834 ) /* timeoutAttachmentsAndEmbedsForMessage */ . handleExplicitMediaScanTimeoutForMessage ) ;
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
}
}
return false ;
} ,
MESSAGE_DELETE : function handleMessageDelete ( id ) {
id = id . id ;
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj . getOrCreate ( id . channelId ) ;
if ( null != orCreate ) {
if ( orCreate . has ( id ) ) {
if ( orCreate . revealedMessageId !== id ) {
cleanMediaMention ( orCreate . get ( id ) ) ;
const removeResult = orCreate . remove ( id ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( removeResult ) ;
2026-07-20 16:05:17 +00:00
set . delete ( id ) ;
} else {
let id2 = orCreate . getAfter ( id ) ;
if ( null == id2 ) {
obj = { revealedMessageId : null } ;
let mutation = orCreate . mutate ( obj ) ;
}
obj = { } ;
id2 = id2 . id ;
obj . revealedMessageId = id2 ;
mutation = orCreate . mutate ( obj ) ;
}
}
}
return false ;
} ,
MESSAGE_DELETE_BULK : function handleMessageDeleteBulk ( ids ) {
ids = ids . ids ;
2026-07-23 10:11:24 +00:00
let mutation ;
2026-07-25 08:10:48 +00:00
let obj = mutation ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj . getOrCreate ( ids . channelId ) ;
if ( null == orCreate ) {
return false ;
} else {
const item = ids . forEach ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
outer1_39 ( orCreate . get ( arg0 ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
const removeManyResult = orCreate . removeMany ( ids ) ;
2026-07-23 10:11:24 +00:00
mutation = removeManyResult ;
2026-07-20 16:05:17 +00:00
if ( orCreate === removeManyResult ) {
return false ;
} else {
let tmp8 = removeManyResult ;
if ( null != removeManyResult . revealedMessageId ) {
tmp8 = removeManyResult ;
if ( obj7 . some ( ids , ( arg0 ) = > mutation . revealedMessageId === arg0 ) ) {
let id = removeManyResult . getAfter ( removeManyResult . revealedMessageId ) ;
if ( null == id ) {
obj = { revealedMessageId : null } ;
2026-07-23 10:11:24 +00:00
mutation = removeManyResult . mutate ( obj ) ;
2026-07-20 16:05:17 +00:00
}
obj = { } ;
id = id . id ;
obj . revealedMessageId = id ;
mutation = removeManyResult . mutate ( obj ) ;
}
2026-07-23 10:11:24 +00:00
obj7 = mutation ( 22 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
mutation ( 4804 ) . commit ( tmp8 ) ;
2026-07-20 16:05:17 +00:00
const item1 = ids . forEach ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
outer1_29 . delete ( arg0 ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
}
} ,
MESSAGE_REVEAL : function handleMessageReveal ( arg0 ) {
let channelId ;
let messageId ;
( { channelId , messageId } = arg0 ) ;
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( channelId ) ;
const obj = importDefault ( 4804 ) ;
importDefault ( 4804 ) . commit ( orCreate . mutate ( { revealedMessageId : messageId } ) ) ;
2026-07-20 16:05:17 +00:00
} ,
THREAD_CREATE_LOCAL : function handleThreadCreateLocal ( channelId ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj . getOrCreate ( channelId . channelId ) ;
2026-07-23 10:11:24 +00:00
obj = { newMessages : [ ] , hasMoreAfter : false , hasMoreBefore : false } ;
2026-07-20 16:05:17 +00:00
const complete = orCreate . loadComplete ( obj ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( complete ) ;
2026-07-20 16:05:17 +00:00
} ,
CHANNEL_DELETE : handleCleanup ,
THREAD_DELETE : handleCleanup ,
GUILD_DELETE : handleCleanup ,
RELATIONSHIP_ADD : handleRelationshipUpdate ,
RELATIONSHIP_UPDATE : handleRelationshipUpdate ,
RELATIONSHIP_REMOVE : handleRelationshipUpdate ,
GUILD_MEMBERS_CHUNK_BATCH : function handleGuildMembersChunkBatch ( chunks ) {
let done ;
const tmp = _createForOfIteratorHelperLoose ( chunks . chunks ) ;
let iter = tmp ( ) ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp2 = performAuthorUpdate ;
let tmp3 = performAuthorUpdate ( iter . value . guildId ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
} ,
THREAD_MEMBER_LIST_UPDATE : function handleThreadMemberListUpdate ( guildId ) {
performAuthorUpdate ( guildId . guildId ) ;
} ,
MESSAGE_REACTION_ADD : handleReaction ,
MESSAGE_REACTION_ADD_MANY : function handleReactionBatch ( reactions ) {
let channelId ;
let messageId ;
2026-07-23 10:11:24 +00:00
reactions = reactions . reactions ;
2026-07-20 16:05:17 +00:00
( { channelId , messageId } = reactions ) ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null == value ) {
return false ;
} else {
const updateResult = value . update ( messageId , ( addReactionBatch ) = > {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_23 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
let id ;
if ( null != currentUser ) {
id = currentUser . id ;
}
return addReactionBatch . addReactionBatch ( reactions , id ) ;
} ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
} ,
MESSAGE_REACTION_REMOVE : handleReaction ,
MESSAGE_REACTION_REMOVE_ALL : function handleRemoveAllReactions ( arg0 ) {
let channelId ;
let messageId ;
( { channelId , messageId } = arg0 ) ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null == value ) {
return false ;
} else {
const updateResult = value . update ( messageId , ( set ) = > set . set ( "reactions" , [ ] ) ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
} ,
MESSAGE_REACTION_REMOVE_EMOJI : function handleRemoveEmojiReactions ( emoji ) {
let channelId ;
let messageId ;
2026-07-23 10:11:24 +00:00
emoji = emoji . emoji ;
2026-07-20 16:05:17 +00:00
( { channelId , messageId } = emoji ) ;
2026-07-25 08:10:48 +00:00
const value = importDefault ( 4804 ) . get ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null == value ) {
return false ;
} else {
const updateResult = value . update ( messageId , ( removeReactionsForEmoji ) = > removeReactionsForEmoji . removeReactionsForEmoji ( emoji ) ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( updateResult ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
} ,
LOGOUT : function handleLogout() {
2026-07-25 08:10:48 +00:00
const item = importDefault ( 4804 ) . forEach ( ( channelId ) = > {
2026-07-23 10:11:24 +00:00
outer1_1 ( outer1_2 [ 24 ] ) . clear ( channelId . channelId ) ;
2026-07-20 16:05:17 +00:00
} ) ;
set . clear ( ) ;
} ,
UPLOAD_START : function handleUploadStart ( message ) {
message = message . message ;
let nonce ;
if ( null != message ) {
nonce = message . nonce ;
}
if ( null != nonce ) {
set . add ( message . nonce ) ;
}
} ,
UPLOAD_FAIL : function handleUploadFail ( messageId ) {
messageId = messageId . messageId ;
if ( null == messageId ) {
return false ;
} else if ( set . has ( messageId ) ) {
2026-07-25 08:10:48 +00:00
const orCreate = importDefault ( 4804 ) . getOrCreate ( tmp ) ;
2026-07-20 16:05:17 +00:00
const value = orCreate . get ( messageId ) ;
if ( null == value ) {
return false ;
} else {
const items = [ value ] ;
const removeResult = orCreate . remove ( messageId ) ;
set . delete ( messageId ) ;
const mergeResult = orCreate . remove ( messageId ) . merge ( items ) ;
2026-07-25 08:10:48 +00:00
importDefault ( 4804 ) . commit ( mergeResult ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj = importDefault ( 4804 ) ;
2026-07-20 16:05:17 +00:00
} else {
return false ;
}
} ,
LOCAL_MESSAGE_CREATE : function handleLocalIncomingMesssage ( message ) {
message = message . message ;
2026-07-23 10:11:24 +00:00
currentUser = currentUser . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
let c31 = true ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
} ) ;
let closure_32 = tmp6 ;
let result = set . fileFinishedImporting ( "stores/MessageStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp6 ;