2026-07-25 08:10:48 +00:00
// Module ID: 5685
2026-07-27 11:26:19 +00:00
// Function ID: 48930
2026-07-20 16:05:17 +00:00
// Name: trackInvite
2026-07-25 08:10:48 +00:00
// Dependencies: [57, 5, 6, 7, 4809, 5686, 5687, 5690, 5910, 5912, 5829, 5036, 4150, 1194, 1348, 5913, 1838, 4116, 4350, 3759, 4218, 4143, 5918, 1850, 653, 5920, 5688, 4124, 27, 3, 4115, 5921, 4120, 5924, 5925, 4325, 5930, 4982, 5949, 5967, 675, 4117, 5968, 5971, 4367, 5974, 1212, 1921, 4667, 686, 5986, 4330, 5987, 5834, 507, 4352, 5604, 14, 5716, 4804, 21, 1883, 1902, 5705, 4807, 5988, 5989, 5992, 5993, 3777, 5915, 1360, 5994, 6020, 6089, 6093, 6096, 6102, 6103, 6125, 664, 6126, 1882, 6024, 3977, 6127, 4471, 2]
2026-07-23 10:11:24 +00:00
2026-07-25 08:10:48 +00:00
// Module 5685 (trackInvite)
2026-07-23 10:11:24 +00:00
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_6 from "_createForOfIteratorHelperLoose" ;
import closure_7 from "_isNativeReflectConstruct" ;
import closure_8 from "_isNativeReflectConstruct" ;
import closure_9 from "_isNativeReflectConstruct" ;
import closure_10 from "_createForOfIteratorHelperLoose" ;
import closure_11 from "_isNativeReflectConstruct" ;
import closure_12 from "_isNativeReflectConstruct" ;
import closure_13 from "_createForOfIteratorHelperLoose" ;
import closure_14 from "_isNativeReflectConstruct" ;
import { ReferencedMessageState } from "_isNativeReflectConstruct" ;
import closure_16 from "_isNativeReflectConstruct" ;
import closure_17 from "_isNativeReflectConstruct" ;
import closure_18 from "_isNativeReflectConstruct" ;
import closure_19 from "_isNativeReflectConstruct" ;
import closure_20 from "_isNativeReflectConstruct" ;
import closure_21 from "_createForOfIteratorHelperLoose" ;
import closure_22 from "_isNativeReflectConstruct" ;
import closure_23 from "_isNativeReflectConstruct" ;
import "_isNativeReflectConstruct" ;
import closure_24 from "_isNativeReflectConstruct" ;
import closure_25 from "_isNativeReflectConstruct" ;
import { SlowmodeType } from "_isNativeReflectConstruct" ;
import closure_27 from "_isNativeReflectConstruct" ;
import ME from "ME" ;
import { LinkType } from "LinkType" ;
import { GuildTemplateStates } from "GUILD_TEMPLATES_MEMBER_COUNT_PROMOTION_THRESHOLD" ;
import MESSAGE_GROUP_SPACING from "MESSAGE_GROUP_SPACING" ;
import importDefaultResult1 from "_defineProperties" ;
import importDefaultResult2 from "_defineProperties" ;
2026-07-20 16:05:17 +00:00
let Permissions ;
2026-07-23 10:11:24 +00:00
let closure_29 ;
let closure_30 ;
let closure_31 ;
let closure_32 ;
let closure_33 ;
let closure_34 ;
let closure_35 ;
let closure_36 ;
let closure_37 ;
let closure_38 ;
let closure_39 ;
let closure_40 ;
let closure_41 ;
let closure_42 ;
let closure_43 ;
let closure_44 ;
let closure_45 ;
let closure_48 ;
let closure_49 ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function trackInvite ( channelId ) {
let _location ;
let inviteAnalyticsMetadata ;
let inviteKey ;
let messageId ;
let overrideProperties ;
( { inviteKey , messageId , location : _location , inviteAnalyticsMetadata , overrideProperties } = channelId ) ;
if ( overrideProperties === undefined ) {
overrideProperties = { } ;
}
2026-07-23 10:11:24 +00:00
id = id . getId ( ) ;
invite = invite . getInvite ( inviteKey ) ;
2026-07-25 08:10:48 +00:00
let obj = require ( 4117 ) /* readSnowflake */ ;
2026-07-20 16:05:17 +00:00
const result = obj . parseExtraDataFromInviteKey ( inviteKey ) ;
let result1 = null != invite ;
if ( result1 ) {
2026-07-25 08:10:48 +00:00
let obj1 = require ( 5968 ) /* isGroupDMInvite */ ;
2026-07-20 16:05:17 +00:00
result1 = obj1 . isEmbeddedApplicationInvite ( invite ) ;
}
let id1 ;
if ( null != invite ) {
const target_application = invite . target_application ;
if ( null != target_application ) {
id1 = target_application . id ;
}
}
if ( tmp8 ) {
2026-07-25 08:10:48 +00:00
let obj2 = require ( 5925 ) /* trackAppEmbedViewed */ ;
2026-07-20 16:05:17 +00:00
const result2 = obj2 . trackAppEmbedLinkSent ( id1 , LinkType . ACTIVITY_INVITE , id ) ;
}
let channel = store . getChannel ( channelId . channelId ) ;
if ( null != channel ) {
if ( channel . isMultiUserDM ( ) ) {
let GDM_INVITE = constants3 . GDM_INVITE ;
} else {
GDM_INVITE = null ;
if ( ! channel . isPrivate ( ) ) {
GDM_INVITE = constants3 . SERVER_INVITE ;
}
}
obj = { } ;
let STREAM = GDM_INVITE ;
if ( null != invite ) {
STREAM = GDM_INVITE ;
if ( invite . state === constants5 . RESOLVED ) {
STREAM = GDM_INVITE ;
if ( null != invite . channel ) {
channel = invite . channel ;
obj . invite_channel_id = channel . id ;
const guild = invite . guild ;
let id2 ;
if ( null != guild ) {
id2 = guild . id ;
}
obj . invite_guild_id = id2 ;
obj . invite_channel_type = channel . type ;
if ( null != invite . inviter ) {
obj . invite_inviter_id = invite . inviter . id ;
}
if ( null != invite . target_application ) {
obj . application_id = invite . target_application . id ;
}
2026-07-23 10:11:24 +00:00
lastActiveStream = lastActiveStream . getLastActiveStream ( ) ;
2026-07-20 16:05:17 +00:00
STREAM = GDM_INVITE ;
if ( null != lastActiveStream ) {
STREAM = GDM_INVITE ;
if ( lastActiveStream . channelId === channel . id ) {
obj . destination_user_id = lastActiveStream . ownerId ;
2026-07-25 08:10:48 +00:00
const streamerApplication = require ( 5971 ) /* _findPlayingActivity */ . getStreamerApplication ( lastActiveStream , closure_24 ) ;
2026-07-20 16:05:17 +00:00
let id3 = null ;
if ( null != streamerApplication ) {
id3 = streamerApplication . id ;
}
obj . application_id = id3 ;
STREAM = constants3 . STREAM ;
2026-07-25 08:10:48 +00:00
const obj9 = require ( 5971 ) /* _findPlayingActivity */ ;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
if ( null != inviteAnalyticsMetadata ) {
if ( null != inviteAnalyticsMetadata . suggestionData ) {
obj . is_suggested = inviteAnalyticsMetadata . suggestionData . isAffinitySuggestion ;
obj . row_num = inviteAnalyticsMetadata . suggestionData . rowNum ;
obj . num_total = inviteAnalyticsMetadata . suggestionData . numTotal ;
obj . num_affinity_connections = inviteAnalyticsMetadata . suggestionData . numAffinityConnections ;
obj . is_filtered = inviteAnalyticsMetadata . suggestionData . isFiltered ;
}
obj . source = inviteAnalyticsMetadata . source ;
}
obj = { } ;
const merged = Object . assign ( obj ) ;
obj [ "location" ] = _location ;
obj [ "invite_type" ] = STREAM ;
obj [ "invite_code" ] = result . baseCode ;
obj [ "guild_id" ] = channel . getGuildId ( ) ;
obj [ "channel_id" ] = channel . id ;
obj [ "message_id" ] = messageId ;
obj [ "send_type" ] = constants4 . DIRECT_MESSAGE ;
obj [ "invite_guild_scheduled_event_id" ] = result . guildScheduledEventId ;
2026-07-25 08:10:48 +00:00
const inviteInstanceId = require ( 4117 ) /* readSnowflake */ . getInviteInstanceId ( result . baseCode , messageId ) ;
2026-07-20 16:05:17 +00:00
let tmp48 = null ;
if ( null != inviteInstanceId ) {
tmp48 = inviteInstanceId ;
}
obj [ "invite_instance_id" ] = tmp48 ;
const merged1 = Object . assign ( overrideProperties ) ;
2026-07-25 08:10:48 +00:00
const obj11 = require ( 4117 ) /* readSnowflake */ ;
importDefault ( 4325 ) . trackWithMetadata ( constants . INVITE_SENT , obj ) ;
const obj12 = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
} else {
obj1 = { } ;
if ( null != invite ) {
if ( invite . state === constants5 . RESOLVED ) {
if ( null != invite . inviter ) {
obj1 . invite_inviter_id = invite . inviter . id ;
if ( null != invite . target_application ) {
obj1 . application_id = invite . target_application . id ;
}
obj2 = { } ;
const merged2 = Object . assign ( obj1 ) ;
obj2 [ "location" ] = _location ;
obj2 [ "invite_type" ] = constants3 . FRIEND_INVITE ;
obj2 [ "invite_code" ] = result . baseCode ;
obj2 [ "message_id" ] = messageId ;
obj2 [ "send_type" ] = constants4 . DIRECT_MESSAGE ;
obj2 [ "invite_guild_scheduled_event_id" ] = result . guildScheduledEventId ;
2026-07-25 08:10:48 +00:00
const inviteInstanceId1 = require ( 4117 ) /* readSnowflake */ . getInviteInstanceId ( result . baseCode , messageId ) ;
2026-07-20 16:05:17 +00:00
let tmp21 = null ;
if ( null != inviteInstanceId1 ) {
tmp21 = inviteInstanceId1 ;
}
obj2 [ "invite_instance_id" ] = tmp21 ;
const merged3 = Object . assign ( overrideProperties ) ;
2026-07-25 08:10:48 +00:00
const obj6 = require ( 4117 ) /* readSnowflake */ ;
importDefault ( 4325 ) . trackWithMetadata ( constants . INVITE_SENT , obj2 ) ;
const obj7 = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
2026-07-23 10:11:24 +00:00
const AbortCodes = ME . AbortCodes ;
( { AnalyticEvents : closure_29 , Endpoints : closure_30 , Permissions , ChannelTypes : closure_31 , LoggingInviteTypes : closure_32 , SendTypes : closure_33 , InviteStates : closure_34 , MessageFlags : closure_35 , MAX_MESSAGES_FOR_JUMP : closure_36 , MessageTypes : closure_37 , AllowedMentionTypes : closure_38 , HelpdeskArticles : closure_39 , MarketingURLs : closure_40 , MessageReferenceTypes : closure_41 , LOCAL_BOT_ID : closure_42 , NON_USER_BOT_DISCRIMINATOR : closure_43 , MessageStates : closure_44 , ActivityActionTypes : closure_45 } = ME ) ;
( { FileUploadErrorTypes : closure_48 , MessageSendLocation : closure_49 } = MESSAGE_GROUP_SPACING ) ;
const MediaPlayerManager = require ( "MESSAGE_GROUP_SPACING" ) . NativeModules . MediaPlayerManager ;
2026-07-20 16:05:17 +00:00
importDefaultResult1 = new importDefaultResult1 ( "MessageActionCreators" ) ;
importDefaultResult2 = new importDefaultResult2 ( "MessageQueue" ) ;
2026-07-23 10:11:24 +00:00
let c53 = false ;
let closure_54 = ( ( ) = > {
2026-07-20 16:05:17 +00:00
class RemoteFetch {
constructor ( ) {
2026-07-23 10:11:24 +00:00
tmp = outer1_6 ( this , RemoteFetch ) ;
2026-07-20 16:05:17 +00:00
this . completed = false ;
return ;
}
}
const items = [
{
key : "markComplete" ,
value() {
this . completed = true ;
}
}
] ;
return callback2 ( RemoteFetch , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let obj = {
messageName : "SLOWMODE_RATE_LIMITED" ,
messageGetter ( rateLimitPerUser ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . IWntYg , { seconds : rateLimitPerUser.rateLimitPerUser } ) ;
2026-07-20 16:05:17 +00:00
}
} ;
obj = {
messageName : "INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS" ,
messageGetter ( rawRecipients ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 1921 ) ;
2026-07-20 16:05:17 +00:00
const articleURL = obj . getArticleURL ( constants7 . DM_COULD_NOT_BE_DELIVERED ) ;
rawRecipients = rawRecipients . rawRecipients ;
if ( null == rawRecipients ) {
rawRecipients = [ ] ;
}
if ( rawRecipients . isDM ( ) ) {
if ( 1 === rawRecipients . length ) {
if ( rawRecipients . some ( ( bot ) = > bot . bot ) ) {
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-20 16:05:17 +00:00
obj = { helpUrl : articleURL } ;
2026-07-23 10:11:24 +00:00
let formatToPlainStringResult = intl2 . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . SkGL7l , obj ) ;
2026-07-20 16:05:17 +00:00
}
return formatToPlainStringResult ;
}
}
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
formatToPlainStringResult = intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . llTkqr , { helpUrl : articleURL } ) ;
2026-07-20 16:05:17 +00:00
}
} ;
obj = {
messageName : "INVALID_MESSAGE_SEND_USER" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-25 08:10:48 +00:00
const obj = { helpUrl : importDefault ( 1921 ) . getArticleURL ( constants7 . DM_COULD_NOT_BE_DELIVERED ) } ;
2026-07-23 10:11:24 +00:00
return intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . SkGL7l , obj ) ;
2026-07-20 16:05:17 +00:00
}
} ;
let closure_55 = {
[ AbortCodes . SLOWMODE_RATE_LIMITED ] : obj ,
[ AbortCodes . INVALID_MESSAGE_SEND_NO_MUTUAL_GUILDS ] : obj ,
[ AbortCodes . INVALID_MESSAGE_SEND_USER ] : obj ,
[ AbortCodes . TOO_MANY_THREADS ] : {
messageName : "TOO_MANY_THREADS" ,
messageGetter ( isForumLikeChannel ) {
if ( ! isForumLikeChannel . isForumLikeChannel ( ) ) {
if ( ! isForumLikeChannel . isForumPost ( ) ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
let stringResult = intl . string ( require ( 1212 ) /* getSystemLocale */ . t [ "5EMPA7" ] ) ;
2026-07-20 16:05:17 +00:00
}
return stringResult ;
}
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
stringResult = intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "/jUd2+" ] ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . TOO_MANY_ANNOUNCEMENT_THREADS ] : {
messageName : "TOO_MANY_ANNOUNCEMENT_THREADS" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t [ "aY+lLC" ] ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . HARMFUL_LINK_MESSAGE_BLOCKED ] : {
messageName : "HARMFUL_LINK_MESSAGE_BLOCKED" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . zSG3Qy , { helpUrl : constants8.HARMFUL_LINKS } ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . HARMFUL_URL_BLOCKED ] : {
messageName : "HARMFUL_URL_BLOCKED" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . WxX2Fd ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . EMAIL_VERIFICATION_REQUIRED ] : {
messageName : "BOT_REQUIRES_EMAIL_VERIFICATION" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . k1Cjqr ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED ] : {
messageName : "GUILD_MESSAGE_UPDATE_RATE_LIMIT_EXCEEDED" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . Z5SUuv ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . RATE_LIMIT_DM_OPEN ] : {
messageName : "BOT_DM_RATE_LIMITED" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . E8nbNb ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . SEND_MESSAGE_TEMPORARILY_DISABLED ] : {
messageName : "BOT_DM_SEND_MESSAGE_TEMPORARILY_DISABLED" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . aRUbah ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . INVALID_MESSAGE_SEND_GAME_FRIEND_DM ] : {
messageName : "BOT_DM_SEND_MESSAGE_INVALID_FOR_GAME_FRIEND" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t [ "/meGhR" ] ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . INVALID_MESSAGE_SEND_PROVISIONAL_ACCOUNT_OFFLINE ] : {
messageName : "BOT_DM_SEND_MESSAGE_INVALID_OFFLINE_PROVISIONAL_ACCOUNT" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . Oc1Zjw ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . TOTAL_ATTACHMENT_SIZE_TOO_LARGE ] : {
messageName : "TOTAL_ATTACHMENT_SIZE_TOO_LARGE" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-25 08:10:48 +00:00
const obj = { maxSizeMb : require ( 4667 ) /* items */ . MAX_TOTAL_ATTACHMENT_SIZE_MB } ;
2026-07-23 10:11:24 +00:00
return intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . DYFPg2 , obj ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . CLOUD_UPLOAD_NOT_FOUND ] : {
messageName : "CLOUD_UPLOAD_NOT_FOUND" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . bQldfH ) ;
2026-07-20 16:05:17 +00:00
}
} ,
[ AbortCodes . INVALID_PERMISSIONS ] : {
messageName : "INVALID_PERMISSIONS" ,
messageGetter() {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
return intl . string ( require ( 1212 ) /* getSystemLocale */ . t . zl4Weq ) ;
2026-07-20 16:05:17 +00:00
}
}
} ;
2026-07-23 10:11:24 +00:00
let obj14 = {
receiveMessage ( channel_id , body , arg2 , outer1_2 ) {
2026-07-20 16:05:17 +00:00
let flag = arg2 ;
2026-07-23 10:11:24 +00:00
let obj = outer1_2 ;
2026-07-20 16:05:17 +00:00
if ( arg2 === undefined ) {
flag = false ;
}
if ( obj === undefined ) {
obj = { } ;
}
obj = { type : "MESSAGE_CREATE" , channelId : channel_id , message : body , optimistic : flag } ;
obj . sendMessageOptions = obj ;
obj . isPushNotification = false ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj ) ;
2026-07-20 16:05:17 +00:00
} ,
sendBotMessage ( id , intl , messageName , nonce ) {
if ( null != messageName ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { message_author : "Clyde" , message_name : messageName } ;
obj . trackWithMetadata ( constants . AUTOMATED_MESSAGE_RECEIVED , obj ) ;
}
obj = { messageId : nonce , channelId : id , content : intl , loggingName : messageName } ;
2026-07-25 08:10:48 +00:00
obj14 . receiveMessage ( id , require ( 5986 ) /* userRecordToServer */ . createBotMessage ( obj ) ) ;
2026-07-20 16:05:17 +00:00
} ,
sendNitroSystemMessage ( channelId , content , nonce ) {
2026-07-23 10:11:24 +00:00
obj = { channelId , nonce , type : constants6 . NITRO_NOTIFICATION , content , flags : closure_35.EPHEMERAL , author : obj } ;
obj = { id : closure_42 , username : "Nitro Notification" , discriminator : closure_43 , avatar : "nitro" , bot : true } ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-25 08:10:48 +00:00
const merged = Object . assign ( importDefault ( 5986 ) ( obj ) ) ;
2026-07-20 16:05:17 +00:00
obj [ "state" ] = constants9 . SENT ;
obj [ "channel_id" ] = channelId ;
obj14 . receiveMessage ( channelId , obj , true ) ;
} ,
sendGiftingPromptSystemMessage ( channelId , giftingPrompt ) {
2026-07-23 10:11:24 +00:00
obj = { channelId , type : constants6 . GIFTING_PROMPT , content : "" , flags : closure_35.EPHEMERAL , author : obj , giftingPrompt } ;
obj = { id : closure_42 , username : "Gifting Prompt" , discriminator : closure_43 , avatar : "gifting_prompt" , bot : true } ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-25 08:10:48 +00:00
const merged = Object . assign ( importDefault ( 5986 ) ( obj ) ) ;
2026-07-20 16:05:17 +00:00
obj [ "state" ] = constants9 . SENT ;
obj14 . receiveMessage ( channelId , obj , true ) ;
} ,
sendGuildBoostUpsellSystemMessage ( channelId , boostingPrompt ) {
2026-07-23 10:11:24 +00:00
obj = { channelId , type : constants6 . GUILD_BOOST_UPSELL , content : "" , flags : closure_35.EPHEMERAL , author : obj , boostingPrompt } ;
obj = { id : closure_42 , username : "Guild Boost Upsell" , discriminator : closure_43 , avatar : "guild_boost_upsell" , bot : true } ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-25 08:10:48 +00:00
const merged = Object . assign ( importDefault ( 5986 ) ( obj ) ) ;
2026-07-20 16:05:17 +00:00
obj [ "state" ] = constants9 . SENT ;
obj14 . receiveMessage ( channelId , obj , true ) ;
} ,
2026-07-23 10:11:24 +00:00
sendClydeError ( closure_0 , code ) {
2026-07-20 16:05:17 +00:00
let num = code ;
if ( code === undefined ) {
num = 0 ;
}
2026-07-23 10:11:24 +00:00
const channel = store . getChannel ( closure_0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != channel ) {
2026-07-23 10:11:24 +00:00
let obj = table [ num ] ;
2026-07-20 16:05:17 +00:00
if ( null != obj ) {
2026-07-23 10:11:24 +00:00
obj14 . sendBotMessage ( closure_0 , obj . messageGetter ( channel ) , obj . messageName ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
2026-07-25 08:10:48 +00:00
obj = { helpUrl : importDefault ( 1921 ) . getArticleURL ( constants7 . DM_COULD_NOT_BE_DELIVERED ) } ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
2026-07-25 08:10:48 +00:00
const obj3 = importDefault ( 1921 ) ;
2026-07-23 10:11:24 +00:00
obj14 . sendBotMessage ( closure_0 , intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . SkGL7l , obj ) , "SEND_FAILED (" + num + ")" ) ;
const formatToPlainStringResult = intl . formatToPlainString ( require ( 1212 ) /* getSystemLocale */ . t . SkGL7l , obj ) ;
2026-07-20 16:05:17 +00:00
}
}
} ,
sendExplicitMediaClydeError ( channelId , attachments1 , EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED ) {
let message ;
let messageName ;
const channel = store . getChannel ( channelId ) ;
if ( null != channel ) {
let obj = { isDM : channel.isDM ( ) , isGDM : channel.isGroupDM ( ) } ;
2026-07-25 08:10:48 +00:00
const match = require ( 4330 ) /* n */ . match ( obj ) ;
2026-07-20 16:05:17 +00:00
obj = { isDM : true } ;
2026-07-25 08:10:48 +00:00
const str2 = require ( 4330 ) /* n */ ;
2026-07-20 16:05:17 +00:00
const withResult = match . with ( obj , ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_DM_EXPLICIT_CONTENT" ;
return obj ;
} ) ;
const withResult1 = match . with ( obj , ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_DM_EXPLICIT_CONTENT" ;
return obj ;
2026-07-23 10:11:24 +00:00
} ) . with ( { isDM : false , isGDM : true } , ( ) = > {
2026-07-20 16:05:17 +00:00
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_GDM_EXPLICIT_CONTENT" ;
return obj ;
} ) ;
( { message , messageName } = match . with ( obj , ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_DM_EXPLICIT_CONTENT" ;
return obj ;
2026-07-23 10:11:24 +00:00
} ) . with ( { isDM : false , isGDM : true } , ( ) = > {
2026-07-20 16:05:17 +00:00
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_GDM_EXPLICIT_CONTENT" ;
return obj ;
} ) . otherwise ( ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t . i4AbAS ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_GUILD_EXPLICIT_CONTENT" ;
return obj ;
} ) ) ;
const otherwiseResult = match . with ( obj , ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_DM_EXPLICIT_CONTENT" ;
return obj ;
2026-07-23 10:11:24 +00:00
} ) . with ( { isDM : false , isGDM : true } , ( ) = > {
2026-07-20 16:05:17 +00:00
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t [ "mktny/" ] ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_GDM_EXPLICIT_CONTENT" ;
return obj ;
} ) . otherwise ( ( ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( outer1_3 [ 46 ] ) . intl ;
obj . message = intl . string ( outer1_0 ( outer1_3 [ 46 ] ) . t . i4AbAS ) ;
2026-07-20 16:05:17 +00:00
obj . messageName = "BOT_GUILD_EXPLICIT_CONTENT" ;
return obj ;
} ) ;
2026-07-25 08:10:48 +00:00
const nonce = require ( 5987 ) /* snowflakeSequence */ . createNonce ( ) ;
2026-07-20 16:05:17 +00:00
obj14 . sendBotMessage ( channelId , message , messageName , nonce ) ;
2026-07-25 08:10:48 +00:00
const obj9 = require ( 5987 ) /* snowflakeSequence */ ;
let obj1 = { action : require ( 5834 ) /* timeoutAttachmentsAndEmbedsForMessage */ . TrackMediaRedactionActionType . EXPLICIT_MEDIA_FALSE_POSITIVE_CLYDE_MESSAGE_SENT , messageId : nonce , channelId , context : EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED } ;
const result = require ( 5834 ) /* timeoutAttachmentsAndEmbedsForMessage */ . trackMediaRedactionAction ( obj1 ) ;
2026-07-20 16:05:17 +00:00
let tmp = null != attachments1 ;
if ( tmp ) {
tmp = attachments1 . length > 0 ;
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
obj1 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
const obj2 = { type : "MESSAGE_EXPLICIT_CONTENT_FP_CREATE" , messageId : nonce , channelId , attachments : attachments1 } ;
obj1 . dispatch ( obj2 ) ;
}
2026-07-25 08:10:48 +00:00
const obj10 = require ( 5834 ) /* timeoutAttachmentsAndEmbedsForMessage */ ;
2026-07-20 16:05:17 +00:00
}
} ,
truncateMessages ( channelId , truncateBottom , truncateTop ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "TRUNCATE_MESSAGES" , channelId , truncateBottom , truncateTop } ;
obj . dispatch ( obj ) ;
} ,
clearChannel ( channelId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "CLEAR_MESSAGES" , channelId } ;
obj . dispatch ( obj ) ;
} ,
jumpToPresent ( channelId , limit ) {
obj14 . trackJump ( channelId , null , "Present" ) ;
let obj = { present : true } ;
if ( closure_23 . hasPresent ( channelId ) ) {
obj = { type : "LOAD_MESSAGES_SUCCESS_CACHED" } ;
obj . jump = obj ;
obj . channelId = channelId ;
obj . limit = limit ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj ) ;
const obj3 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
} else {
obj = { channelId , limit } ;
obj . jump = obj ;
const messages = obj14 . fetchMessages ( obj ) ;
}
} ,
trackJump ( channelId , id , Present , extraProperties ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { context : Present , channel_id : channelId , message_id : id } ;
const merged = Object . assign ( extraProperties ) ;
obj . trackWithMetadata ( constants . JUMP , obj ) ;
} ,
jumpToMessage ( arg0 ) {
let avoidInitialScroll ;
let channelId ;
let context ;
let extraProperties ;
let flash ;
let isPreload ;
let jumpType ;
let messageId ;
let offset ;
let onJumpComplete ;
let returnMessageId ;
let skipLocalFetch ;
( { channelId , messageId , flash } = arg0 ) ;
if ( flash === undefined ) {
flash = false ;
}
( { context , extraProperties , offset } = arg0 ) ;
if ( extraProperties === undefined ) {
extraProperties = null ;
}
( { isPreload , returnMessageId , skipLocalFetch , jumpType , avoidInitialScroll , onJumpComplete } = arg0 ) ;
if ( "string" === typeof context ) {
obj14 . trackJump ( channelId , messageId , context , extraProperties ) ;
}
let tmp8 = null == MediaPlayerManager ;
if ( ! tmp8 ) {
tmp8 = null == MediaPlayerManager . pauseAllMediaPlayers ;
}
if ( ! tmp8 ) {
MediaPlayerManager . pauseAllMediaPlayers ( ) ;
}
2026-07-23 10:11:24 +00:00
obj = { channelId , limit : closure_36 , jump : obj , isPreload , skipLocalFetch , avoidInitialScroll } ;
2026-07-20 16:05:17 +00:00
obj = { messageId , flash , offset , returnMessageId , jumpType , onJumpComplete } ;
return obj14 . fetchMessages ( obj ) ;
} ,
focusMessage ( channelId ) {
2026-07-23 10:11:24 +00:00
obj = { channelId : channelId.channelId , limit : closure_36 , focus : obj } ;
2026-07-20 16:05:17 +00:00
obj = { messageId : channelId.messageId } ;
const messages = obj14 . fetchMessages ( obj ) ;
} ,
fetchMessage ( arg0 ) {
2026-07-23 10:11:24 +00:00
let importDefault ;
let require ;
( { channelId : require , messageId : importDefault } = arg0 ) ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
const HTTP = outer2_0 ( outer2_3 [ 54 ] ) . HTTP ;
obj = { url : outer2_30.MESSAGES ( outer1_0 ) , query : obj , retries : 2 , oldFormErrors : true } ;
obj = { limit : 1 , around : outer1_1 , rejectWithError : outer2_0 ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) } ;
2026-07-20 16:05:17 +00:00
const tmp = yield HTTP . get ( obj ) ;
if ( tmp . body . length > 0 ) {
2026-07-23 10:11:24 +00:00
return outer2_0 ( outer2_3 [ 55 ] ) . createMessageRecord ( tmp . body [ 0 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj3 = outer2_0 ( outer2_3 [ 54 ] ) ;
2026-07-20 16:05:17 +00:00
} ) ( ) ;
} ,
fetchMessages ( channelId ) {
2026-07-23 10:11:24 +00:00
let closure_6 ;
let closure_7 ;
2026-07-20 16:05:17 +00:00
let feature ;
let fetchKey ;
let focus ;
let isPreload ;
let skipLocalFetch ;
let truncate ;
const self = this ;
channelId = channelId . channelId ;
const before = channelId . before ;
const after = channelId . after ;
const limit = channelId . limit ;
const jump = channelId . jump ;
( { focus , truncate } = channelId ) ;
( { forICYMI : closure_6 , avoidInitialScroll : closure_7 , fetchKey } = channelId ) ;
2026-07-23 10:11:24 +00:00
let messageId ;
let c12 ;
2026-07-20 16:05:17 +00:00
( { isPreload , skipLocalFetch , feature } = channelId ) ;
const channel = store . getChannel ( channelId ) ;
2026-07-23 10:11:24 +00:00
let closure_9 = fetchKey . isConnectedOrOverlay ( ) ;
2026-07-20 16:05:17 +00:00
let timestamp = Date . now ( ) ;
if ( null != channel ) {
if ( channel . type === constants2 . GUILD_STORE ) {
return false ;
}
}
2026-07-23 10:11:24 +00:00
if ( channelId !== channelId ( limit [ 56 ] ) . FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID ) {
2026-07-20 16:05:17 +00:00
const _JSON = JSON ;
const _HermesInternal = HermesInternal ;
importDefaultResult1 . log ( "Fetching messages for " + channelId + " between " + after + " and " + before + ". jump=" + JSON . stringify ( jump ) ) ;
let obj = { channelId , before , after , limit , jump , focus , truncate } ;
if ( ! obj14 . _tryFetchMessagesCached ( obj ) ) {
2026-07-23 10:11:24 +00:00
let fetchMessages = before ( limit [ 57 ] ) . fetchMessages ;
2026-07-20 16:05:17 +00:00
fetchMessages . recordStart ( ) ;
2026-07-23 10:11:24 +00:00
obj = before ( limit [ 58 ] ) ;
2026-07-20 16:05:17 +00:00
let tmp7 = timestamp ;
if ( null != fetchKey ) {
tmp7 = fetchKey ;
}
2026-07-23 10:11:24 +00:00
let result = obj . recordChannelFetchStart ( channelId , tmp7 , before , after , limit ) ;
2026-07-20 16:05:17 +00:00
let tmp15 ;
if ( null != jump ) {
tmp15 = jump ;
}
if ( tmp16 ) {
obj = { } ;
const merged = Object . assign ( focus ) ;
tmp15 = obj ;
}
2026-07-23 10:11:24 +00:00
let obj2 = before ( limit [ 59 ] ) ;
2026-07-20 16:05:17 +00:00
const orCreate = obj2 . getOrCreate ( channelId ) ;
const start = orCreate . loadStart ( tmp15 ) ;
2026-07-23 10:11:24 +00:00
before ( limit [ 59 ] ) . commit ( start ) ;
const obj5 = before ( limit [ 59 ] ) ;
tmp16 = null == tmp15 && null != focus ;
2026-07-20 16:05:17 +00:00
const obj1 = { type : "LOAD_MESSAGES" } ;
2026-07-23 10:11:24 +00:00
before ( limit [ 49 ] ) . dispatch ( obj1 ) ;
messageId = undefined ;
2026-07-20 16:05:17 +00:00
if ( null != tmp15 ) {
messageId = tmp15 . messageId ;
}
const prototype = ctor . prototype ;
const tmp29 = new ctor ( ) ;
2026-07-23 10:11:24 +00:00
c12 = tmp29 ;
2026-07-20 16:05:17 +00:00
if ( ! skipLocalFetch ) {
if ( null != fetchKey ) {
timestamp = fetchKey ;
}
const localMessages = self . fetchLocalMessages ( channelId , timestamp , before , after , limit , tmp30 ) ;
}
2026-07-23 10:11:24 +00:00
const HTTP = channelId ( limit [ 54 ] ) . HTTP ;
2026-07-20 16:05:17 +00:00
obj2 = { url : closure_30.MESSAGES ( channelId ) } ;
const obj3 = { before , after , limit , around : messageId , preload : isPreload , feature } ;
obj2 . query = obj3 ;
obj2 . retries = 2 ;
obj2 . oldFormErrors = true ;
2026-07-23 10:11:24 +00:00
const obj6 = before ( limit [ 49 ] ) ;
obj2 . rejectWithError = channelId ( limit [ 54 ] ) . rejectWithMigratedError ( ) ;
2026-07-20 16:05:17 +00:00
const value = HTTP . get ( obj2 ) ;
return value . then ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
const fetchMessages = before ( limit [ 57 ] ) . fetchMessages ;
fetchMessages . recordEnd ( ) ;
const dispatchMessages = before ( limit [ 57 ] ) . dispatchMessages ;
dispatchMessages . measure ( ( ) = > {
2026-07-23 10:11:24 +00:00
body = body . body ;
let flag = null != outer1_11 ;
2026-07-20 16:05:17 +00:00
if ( ! flag ) {
2026-07-23 10:11:24 +00:00
let tmp4 = body . length === outer1_3 ;
2026-07-20 16:05:17 +00:00
if ( tmp4 ) {
let tmp5 = tmp ;
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
let tmp7 = null == outer1_1 ;
2026-07-20 16:05:17 +00:00
if ( tmp7 ) {
2026-07-23 10:11:24 +00:00
tmp7 = null == outer1_2 ;
2026-07-20 16:05:17 +00:00
}
tmp5 = tmp7 ;
}
tmp4 = tmp5 ;
}
flag = tmp4 ;
}
2026-07-23 10:11:24 +00:00
let flag2 = null != outer1_11 ;
2026-07-20 16:05:17 +00:00
if ( ! flag2 ) {
let tmp9 = tmp2 ;
if ( tmp2 ) {
2026-07-23 10:11:24 +00:00
tmp9 = body . length === outer1_3 ;
2026-07-20 16:05:17 +00:00
}
flag2 = tmp9 ;
}
let tmp11 = flag ;
let flag3 = flag2 ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_11 ) {
2026-07-20 16:05:17 +00:00
const _Math = Math ;
2026-07-23 10:11:24 +00:00
const rounded = Math . floor ( outer1_3 / 2 ) ;
const items = [ outer1_11 ] ;
2026-07-20 16:05:17 +00:00
HermesBuiltin . arraySpread ( body . map ( ( id ) = > id . id ) , 1 ) ;
const found = items . filter ( ( arg0 , arg1 , arr ) = > arr . indexOf ( arg0 ) === arg1 ) ;
2026-07-23 10:11:24 +00:00
const sorted = found . sort ( before ( limit [ 60 ] ) . compare ) ;
const index = sorted . indexOf ( outer1_11 ) ;
if ( index < rounded + outer1_3 % 2 - 1 ) {
2026-07-20 16:05:17 +00:00
flag = false ;
}
if ( body . length - index < rounded ) {
flag2 = false ;
}
tmp11 = flag ;
flag3 = flag2 ;
if ( flag2 ) {
tmp11 = flag ;
flag3 = flag2 ;
if ( body . length > 0 ) {
tmp11 = flag ;
flag3 = flag2 ;
2026-07-23 10:11:24 +00:00
if ( body [ 0 ] . id === outer2_25 . lastMessageId ( body ) ) {
2026-07-20 16:05:17 +00:00
flag3 = false ;
tmp11 = flag ;
}
}
}
}
2026-07-23 10:11:24 +00:00
outer2_51 . log ( "Fetched " + body . length + " messages for " + body + " isBefore:" + null != outer1_1 + " isAfter:" + null != outer1_2 ) ;
outer1_12 . markComplete ( ) ;
let obj = before ( limit [ 49 ] ) ;
obj = { type : "LOAD_MESSAGES_SUCCESS" , channelId : body , messages : body , isBefore : tmp , isAfter : tmp2 , hasMoreBefore : tmp11 , hasMoreAfter : flag3 , limit : outer1_3 , jump : outer1_4 , forICYMI : outer1_6 } ;
let tmp16 = ! outer1_9 ;
2026-07-20 16:05:17 +00:00
if ( ! tmp16 ) {
2026-07-23 10:11:24 +00:00
tmp16 = fetchKey . lastTimeConnectedChanged ( ) >= outer1_10 ;
2026-07-20 16:05:17 +00:00
}
obj . isStale = tmp16 ;
2026-07-23 10:11:24 +00:00
obj . truncate = outer1_5 ;
obj . avoidInitialScroll = outer1_7 ;
2026-07-20 16:05:17 +00:00
obj . dispatch ( obj ) ;
2026-07-23 10:11:24 +00:00
const result = before ( limit [ 58 ] ) . recordChannelFetchedNetwork ( body , null != outer1_8 ? outer1_8 : outer1_10 , outer1_1 , outer1_2 , outer1_3 , body ) ;
2026-07-20 16:05:17 +00:00
} ) ;
return true ;
} , ( ) = > {
2026-07-23 10:11:24 +00:00
outer1_51 . log ( "Failed to fetch messages for " + channelId ) ;
2026-07-20 16:05:17 +00:00
let obj = before ( limit [ 49 ] ) ;
obj = { type : "LOAD_MESSAGES_FAILURE" , channelId } ;
obj . dispatch ( obj ) ;
return false ;
} ) ;
}
}
} ,
fetchLocalMessages ( channelId , timestamp , before , after , limit , arg5 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = channelId ;
let closure_1 = timestamp ;
let closure_2 = before ;
let closure_3 = after ;
let _createForOfIteratorHelperLoose = limit ;
2026-07-20 16:05:17 +00:00
const callback = arg5 ;
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let c0 ;
const basicChannel = outer2_19 . getBasicChannel ( outer1_0 ) ;
2026-07-25 08:10:48 +00:00
let obj = callback2 ( 4804 ) ;
2026-07-23 10:11:24 +00:00
const orCreate = obj . getOrCreate ( outer1_0 ) ;
2026-07-25 08:10:48 +00:00
const databaseResult = callback2 ( 1883 ) . database ( ) ;
2026-07-23 10:11:24 +00:00
c0 = databaseResult ;
2026-07-20 16:05:17 +00:00
if ( null != databaseResult ) {
if ( null != basicChannel ) {
2026-07-23 10:11:24 +00:00
if ( null == outer1_2 ) {
if ( null == outer1_3 ) {
2026-07-20 16:05:17 +00:00
if ( orCreate . ready ) {
if ( ! orCreate . cached ) {
2026-07-23 10:11:24 +00:00
callback2 ( 14 ) . addLocalMessages ( outer1_0 , - 2 ) ;
const obj4 = callback2 ( 14 ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-25 08:10:48 +00:00
const tmp13 = yield callback ( 1902 ) . tryLoadAsync ( ( ) = > callback ( table [ 63 ] ) . load ( c0 , outer2_0 , outer2_4 ) ) ;
2026-07-20 16:05:17 +00:00
if ( null != tmp13 ) {
const _HermesInternal = HermesInternal ;
2026-07-23 10:11:24 +00:00
outer2_51 . log ( "fetched " + tmp13 . messages . length + " messages from local database (channel_id: " + outer1_0 + ", remote_fetch_completed: " + outer1_5 . completed + ")" ) ;
callback2 ( 14 ) . addLocalMessages ( outer1_0 , tmp13 . messages . length ) ;
if ( ! outer1_5 . completed ) {
2026-07-20 16:05:17 +00:00
if ( tmp13 . messages . length > 0 ) {
2026-07-23 10:11:24 +00:00
let tmp28 = tmp13 . messages . length >= outer1_4 ;
2026-07-20 16:05:17 +00:00
if ( tmp28 ) {
2026-07-23 10:11:24 +00:00
tmp28 = tmp13 . connectionId === outer2_8 . lastTimeConnectedChanged ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj8 = callback2 ( 5716 ) ;
2026-07-23 10:11:24 +00:00
const result = obj8 . recordChannelFetchedLocal ( outer1_0 , outer1_1 , outer1_2 , outer1_3 , outer1_4 , tmp13 . messages ) ;
obj = { type : "LOCAL_MESSAGES_LOADED" , guildId : basicChannel.guild_id , channelId : outer1_0 } ;
2026-07-20 16:05:17 +00:00
( { users : obj10.users , members : obj10.members , messages : obj10.messages } = tmp13 ) ;
obj . stale = ! tmp28 ;
2026-07-23 10:11:24 +00:00
callback2 ( 686 ) . dispatch ( obj ) ;
const obj9 = callback2 ( 686 ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const obj7 = callback2 ( 14 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
callback2 ( 14 ) . addLocalMessages ( outer1_0 , - 3 ) ;
const obj6 = callback2 ( 14 ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
const obj5 = callback ( 1902 ) ;
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-25 08:10:48 +00:00
const obj2 = callback2 ( 1883 ) ;
2026-07-23 10:11:24 +00:00
callback2 ( 14 ) . addLocalMessages ( outer1_0 , - 1 ) ;
2026-07-20 16:05:17 +00:00
} ) ( ) ;
} ,
2026-07-21 22:01:30 +00:00
fetchNewLocalMessages ( channelId , closure_18 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = channelId ;
let closure_1 = closure_18 ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let c0 ;
2026-07-20 16:05:17 +00:00
let id ;
2026-07-23 10:11:24 +00:00
const basicChannel = outer2_19 . getBasicChannel ( outer1_0 ) ;
let obj = callback2 ( outer2_3 [ 61 ] ) ;
const databaseResult = obj . database ( ) ;
c0 = databaseResult ;
2026-07-20 16:05:17 +00:00
if ( null != databaseResult ) {
if ( null != basicChannel ) {
2026-07-23 10:11:24 +00:00
if ( ! obj3 . getOrCreate ( outer1_0 ) . hasMoreAfter ) {
const tmp5 = yield callback ( outer2_3 [ 62 ] ) . tryLoadAsync ( ( ) = > id ( outer3_3 [ 63 ] ) . load ( c0 , outer2_0 , outer2_1 ) ) ;
2026-07-20 16:05:17 +00:00
if ( null != tmp5 ) {
2026-07-23 10:11:24 +00:00
const orCreate = callback2 ( outer2_3 [ 59 ] ) . getOrCreate ( outer1_0 ) ;
2026-07-20 16:05:17 +00:00
const lastResult = orCreate . last ( ) ;
id = undefined ;
if ( null != lastResult ) {
id = lastResult . id ;
}
if ( null == id ) {
let messages = tmp5 . messages ;
} else {
const messages1 = tmp5 . messages ;
2026-07-23 10:11:24 +00:00
messages = messages1 . filter ( ( id ) = > id ( outer3_3 [ 60 ] ) . compare ( id . id , id ) > 0 ) ;
2026-07-20 16:05:17 +00:00
}
const _HermesInternal = HermesInternal ;
2026-07-23 10:11:24 +00:00
outer2_51 . log ( "Fetched " + tmp5 . messages . length + " messages from the cache after foregrounding. " + messages . length + " are new" ) ;
2026-07-20 16:05:17 +00:00
if ( 0 !== messages . length ) {
2026-07-23 10:11:24 +00:00
obj = { type : "LOCAL_MESSAGES_LOADED" , guildId : basicChannel.guild_id , channelId : outer1_0 } ;
2026-07-20 16:05:17 +00:00
( { users : obj7.users , members : obj7.members } = tmp5 ) ;
obj . messages = messages ;
obj . stale = true ;
2026-07-23 10:11:24 +00:00
const obj6 = callback2 ( outer2_3 [ 49 ] ) ;
obj . isForegroundCacheLoad = callback ( outer2_3 [ 64 ] ) . isIOSPushNotificationRawPayloadFixExperimentEnabled ( ) ;
2026-07-20 16:05:17 +00:00
obj6 . dispatch ( obj ) ;
2026-07-23 10:11:24 +00:00
const obj8 = callback ( outer2_3 [ 64 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj4 = callback2 ( outer2_3 [ 59 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const obj2 = callback ( outer2_3 [ 62 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj3 = callback2 ( outer2_3 [ 59 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
} ) ( ) ;
} ,
_tryFetchMessagesCached ( arg0 ) {
let after ;
let before ;
let channelId ;
let focus ;
let jump ;
let limit ;
let truncate ;
( { channelId , before , after , limit , jump , focus , truncate } = arg0 ) ;
const messages = closure_23 . getMessages ( channelId ) ;
if ( ! messages . cached ) {
if ( messages . ready ) {
let messageId ;
if ( null != jump ) {
messageId = jump . messageId ;
}
if ( null == messageId ) {
let messageId1 ;
if ( null != focus ) {
messageId1 = focus . messageId ;
}
if ( null == messageId1 ) {
if ( null != before ) {
if ( messages . hasBeforeCached ( before ) ) {
2026-07-23 10:11:24 +00:00
let obj3 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
let obj = { type : "LOAD_MESSAGES_SUCCESS_CACHED" , channelId , before , limit , truncate } ;
obj3 . dispatch ( obj ) ;
let flag = true ;
}
return flag ;
}
const tmp4 = null == after || ! messages . hasAfterCached ( after ) ;
flag = ! tmp4 ;
if ( ! tmp4 ) {
2026-07-23 10:11:24 +00:00
let obj1 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "LOAD_MESSAGES_SUCCESS_CACHED" , channelId , after , limit , truncate } ;
obj1 . dispatch ( obj ) ;
flag = true ;
}
}
}
let messageId2 ;
if ( null != jump ) {
messageId2 = jump . messageId ;
}
if ( null != messageId2 ) {
if ( messages . has ( jump . messageId , false ) ) {
obj1 = { type : "LOAD_MESSAGES_SUCCESS_CACHED" , channelId , jump , limit , truncate } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj1 ) ;
2026-07-20 16:05:17 +00:00
return true ;
}
}
let messageId3 ;
if ( null != focus ) {
messageId3 = focus . messageId ;
}
let tmp13 = jump ;
if ( null != messageId3 ) {
if ( messages . has ( focus . messageId , false ) ) {
const obj2 = { type : "LOAD_MESSAGES_SUCCESS_CACHED" , channelId , focus , limit , truncate } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj2 ) ;
2026-07-20 16:05:17 +00:00
return true ;
} else {
obj3 = { } ;
const merged = Object . assign ( focus ) ;
tmp13 = obj3 ;
}
}
let messageId4 ;
if ( null != tmp13 ) {
messageId4 = tmp13 . messageId ;
}
let num3 = 0 ;
if ( null != messageId4 ) {
let messageId5 ;
if ( null != tmp13 ) {
messageId5 = tmp13 . messageId ;
}
2026-07-23 10:11:24 +00:00
num3 = importDefault ( 21 ) . extractTimestamp ( messageId5 ) ;
const obj7 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
const firstResult = messages . first ( ) ;
const lastResult = messages . last ( ) ;
let flag4 = ! messages . hasMoreBefore && null != firstResult ;
if ( flag4 ) {
2026-07-23 10:11:24 +00:00
flag4 = importDefault ( 21 ) . extractTimestamp ( firstResult . id ) >= num3 ;
const obj8 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
if ( ! flag4 ) {
let tmp25 = ! messages . hasMoreAfter && null != lastResult ;
if ( tmp25 ) {
2026-07-23 10:11:24 +00:00
tmp25 = importDefault ( 21 ) . extractTimestamp ( lastResult . id ) <= num3 ;
const obj9 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
flag4 = tmp25 ;
}
if ( ! flag4 ) {
let tmp28 = null != firstResult && null != lastResult ;
if ( tmp28 ) {
2026-07-23 10:11:24 +00:00
tmp28 = importDefault ( 21 ) . extractTimestamp ( firstResult . id ) < num3 ;
const obj10 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
if ( tmp28 ) {
2026-07-23 10:11:24 +00:00
tmp28 = importDefault ( 21 ) . extractTimestamp ( lastResult . id ) > num3 ;
const obj11 = importDefault ( 21 ) ;
2026-07-20 16:05:17 +00:00
}
flag4 = tmp28 ;
}
if ( flag4 ) {
const obj4 = { type : "LOAD_MESSAGES_SUCCESS_CACHED" , channelId , jump : tmp13 , limit : closure_36 } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj4 ) ;
2026-07-20 16:05:17 +00:00
flag4 = true ;
2026-07-23 10:11:24 +00:00
const obj12 = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
}
return flag4 ;
}
}
return false ;
} ,
sendMessage ( arg0 , arg1 ) {
let flag = arg2 ;
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
2026-07-20 16:05:17 +00:00
if ( arg2 === undefined ) {
flag = true ;
}
2026-07-23 10:11:24 +00:00
let closure_3 = arg3 ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let c0 ;
if ( outer1_1 . reaction ) {
2026-07-20 16:05:17 +00:00
return Promise . resolve ( ) ;
} else {
2026-07-23 10:11:24 +00:00
const tmp4 = yield closure_1 ( closure_3 [ 65 ] ) ( outer1_0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != tmp4 ) {
2026-07-23 10:11:24 +00:00
return outer2_56 . sendMessage ( tmp4 , outer1_1 , outer1_2 , outer1_3 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let nonce = outer1_3 . nonce ;
2026-07-20 16:05:17 +00:00
if ( null == nonce ) {
2026-07-25 08:10:48 +00:00
let obj = callback ( 5987 ) ;
2026-07-20 16:05:17 +00:00
nonce = obj . createNonce ( ) ;
}
obj = { } ;
2026-07-23 10:11:24 +00:00
const merged = Object . assign ( outer1_3 ) ;
2026-07-20 16:05:17 +00:00
obj [ "nonce" ] = nonce ;
2026-07-23 10:11:24 +00:00
outer1_3 = obj ;
2026-07-25 08:10:48 +00:00
const backgroundifyResult = callback2 ( 5989 ) . backgroundify ( function _trySend() {
2026-07-23 10:11:24 +00:00
return outer3_56 . _sendMessage ( outer2_0 , outer2_1 , outer2_3 ) ;
2026-07-20 16:05:17 +00:00
} , undefined ) ;
2026-07-23 10:11:24 +00:00
c0 = backgroundifyResult ;
const result = outer2_11 . recordMessageSendAttempt ( outer1_0 , nonce , outer1_3 ) ;
if ( outer2_23 . isReady ( outer1_0 ) ) {
2026-07-20 16:05:17 +00:00
let backgroundifyResultResult = backgroundifyResult ( ) ;
} else {
2026-07-23 10:11:24 +00:00
if ( outer1_2 ) {
2026-07-24 07:16:23 +00:00
if ( outer1_0 !== callback ( 5604 ) . FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID ) {
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
2026-07-23 10:11:24 +00:00
outer2_52 . info ( "Waiting for channel " + outer1_0 + " to be ready before sending." ) ;
backgroundifyResultResult = new Promise ( ( arg0 , arg1 ) = > {
let closure_0 = arg0 ;
let closure_1 = arg1 ;
outer3_23 . whenReady ( outer2_0 , ( ) = > {
outer4_52 . info ( "Channel " + outer3_0 + " is ready for sending now." ) ;
callback ( ) . then ( callback , closure_1 ) ;
2026-07-20 16:05:17 +00:00
} ) ;
} ) ;
}
}
backgroundifyResultResult = backgroundifyResult ( ) ;
}
return backgroundifyResultResult ;
}
}
} ) ( ) ;
} ,
getSendMessageOptionsForReply ( pendingReply ) {
if ( null == pendingReply ) {
let obj = { } ;
} else {
obj = { } ;
obj = { } ;
const channel = pendingReply . channel ;
const guildId = channel . getGuildId ( ) ;
let tmp ;
if ( null != guildId ) {
tmp = guildId ;
}
obj . guild_id = tmp ;
obj . channel_id = pendingReply . channel . id ;
obj . message_id = pendingReply . message . id ;
obj . messageReference = obj ;
let tmp2 ;
if ( ! pendingReply . shouldMention ) {
obj = { } ;
const _Object = Object ;
obj . parse = Object . values ( closure_38 ) ;
obj . replied_user = false ;
tmp2 = obj ;
}
obj . allowedMentions = tmp2 ;
obj . mediaMention = pendingReply . mediaMention ;
}
return obj ;
} ,
getSendMessageOptionsForStickers ( stickers ) {
stickers = stickers . stickers ;
if ( null != stickers ) {
if ( 0 !== stickers . length ) {
if ( ! tmp ) {
let obj = { stickerIds : stickers } ;
}
return obj ;
}
}
obj = { } ;
} ,
getSendMessageOptionsForScheduledMessage ( scheduledTimestamp ) {
scheduledTimestamp = scheduledTimestamp . scheduledTimestamp ;
if ( null == scheduledTimestamp ) {
let obj = { } ;
} else {
obj = { scheduledTimestamp } ;
}
return obj ;
} ,
getSendMessageOptionsForAlsoForwardToChannel ( alsoForwardToChannelId ) {
return { alsoForwardToChannelId : alsoForwardToChannelId.alsoForwardToChannelId } ;
} ,
getSendMessageOptions ( pendingReply ) {
let obj = { } ;
const merged = Object . assign ( obj14 . getSendMessageOptionsForReply ( pendingReply . pendingReply ) ) ;
obj = { } ;
const merged1 = Object . assign ( pendingReply ) ;
const merged2 = Object . assign ( obj14 . getSendMessageOptionsForStickers ( obj ) ) ;
obj = { } ;
const merged3 = Object . assign ( pendingReply ) ;
const merged4 = Object . assign ( obj14 . getSendMessageOptionsForScheduledMessage ( obj ) ) ;
const merged5 = Object . assign ( pendingReply ) ;
const merged6 = Object . assign ( obj14 . getSendMessageOptionsForAlsoForwardToChannel ( { } ) ) ;
return obj ;
} ,
sendInvite ( id , code , _location , closure_1 , content ) {
2026-07-25 08:10:48 +00:00
const tmp = importDefault ( 5992 ) ( code ) ;
2026-07-20 16:05:17 +00:00
let combined = tmp ;
if ( null != content ) {
const _HermesInternal = HermesInternal ;
combined = "" + content + "\n" + tmp ;
}
let obj = { content : combined , tts : false , validNonShortcutEmojis : [ ] , invalidEmojis : [ ] } ;
obj = { location : _location , inviteAnalyticsMetadata : closure_1 } ;
return obj14 . _sendMessage ( id , obj , obj ) ;
} ,
sendActivityBookmark ( arg0 , content , location , inviteAnalyticsMetadata ) {
let obj = { content , tts : false , validNonShortcutEmojis : [ ] , invalidEmojis : [ ] } ;
obj = { location , inviteAnalyticsMetadata } ;
return obj14 . _sendMessage ( arg0 , obj , obj ) ;
} ,
sendStickers ( id , items1 , result , arg3 ) {
let str = result ;
let flag = arg4 ;
if ( result === undefined ) {
str = "" ;
}
if ( flag === undefined ) {
flag = false ;
}
if ( "string" === typeof str ) {
let obj = { content : str , invalidEmojis : [ ] , validNonShortcutEmojis : [ ] , tts : flag } ;
let tmp6 = obj ;
} else {
obj = { } ;
const merged = Object . assign ( str ) ;
const tts = str . tts ;
let tmp5 = flag ;
if ( null != tts ) {
tmp5 = tts ;
}
obj [ "tts" ] = tmp5 ;
tmp6 = obj ;
}
obj = { } ;
const merged1 = Object . assign ( arg3 ) ;
obj [ "stickerIds" ] = items1 ;
return obj14 . _sendMessage ( id , tmp6 , obj ) ;
} ,
2026-07-23 10:11:24 +00:00
sendGreetMessage ( id , _749054660769218631 , sendMessageOptionsForReply ) {
2026-07-20 16:05:17 +00:00
let allowedMentions ;
let messageReference ;
let obj = sendMessageOptionsForReply ;
2026-07-23 10:11:24 +00:00
const _require = id ;
let closure_1 = _749054660769218631 ;
2026-07-20 16:05:17 +00:00
if ( sendMessageOptionsForReply === undefined ) {
obj = { } ;
}
( { messageReference , allowedMentions } = obj ) ;
2026-07-23 10:11:24 +00:00
const HTTP = _require ( 507 ) . HTTP ;
2026-07-20 16:05:17 +00:00
obj = { url : closure_30.MESSAGES_GREET ( id ) , body : { sticker_ids : items , allowed_mentions : allowedMentions , message_reference : messageReference } , oldFormErrors : true } ;
2026-07-23 10:11:24 +00:00
items = [ _749054660769218631 ] ;
obj . rejectWithError = _require ( 507 ) . rejectWithMigratedError ( ) ;
2026-07-20 16:05:17 +00:00
obj = { location : constants10.GREET } ;
obj . context = obj ;
2026-07-23 10:11:24 +00:00
const obj3 = _require ( 507 ) ;
2026-07-20 16:05:17 +00:00
return HTTP . post ( obj ) . then ( ( body ) = > {
2026-07-23 10:11:24 +00:00
v749054660769218631 ( outer1_3 [ 68 ] ) . donateSentMessage ( body . body . content , closure_0 ) ;
outer1_56 . receiveMessage ( closure_0 , body . body ) ;
const obj = v749054660769218631 ( outer1_3 [ 68 ] ) ;
const items = [ v749054660769218631 ] ;
v749054660769218631 ( outer1_3 [ 49 ] ) . dispatch ( { type : "STICKER_TRACK_USAGE" , stickerIds : items } ) ;
2026-07-20 16:05:17 +00:00
return body ;
} , ( messageId ) = > {
2026-07-23 10:11:24 +00:00
outer1_51 . log ( "Failed to send greeting" ) ;
2026-07-20 16:05:17 +00:00
if ( 429 !== messageId . status ) {
2026-07-23 10:11:24 +00:00
outer1_56 . sendClydeError ( closure_0 , messageId . body . code ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let obj = v749054660769218631 ( outer1_3 [ 49 ] ) ;
obj = { type : "MESSAGE_SEND_FAILED" , messageId : messageId.body.id , channelId : closure_0 } ;
2026-07-20 16:05:17 +00:00
obj . dispatch ( obj ) ;
throw messageId ;
} ) ;
} ,
sendPollMessage ( id , arg1 , arg2 ) {
let obj = arg2 ;
if ( arg2 === undefined ) {
obj = { } ;
}
2026-07-23 10:11:24 +00:00
obj = { content : "" , tts : false , validNonShortcutEmojis : [ ] , invalidEmojis : [ ] } ;
2026-07-20 16:05:17 +00:00
obj = { } ;
const merged = Object . assign ( obj ) ;
obj [ "poll" ] = arg1 ;
obj [ "location" ] = constants10 . POLL_CREATION ;
2026-07-23 10:11:24 +00:00
return obj14 . _sendMessage ( id , obj , obj ) ;
2026-07-20 16:05:17 +00:00
} ,
2026-07-23 10:11:24 +00:00
validateMessage ( invalidEmojis , currentUser , outer1_0 ) {
2026-07-20 16:05:17 +00:00
if ( invalidEmojis . some ( ( animated ) = > animated . animated ) ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 3777 ) ;
2026-07-20 16:05:17 +00:00
if ( ! obj . canUseAnimatedEmojis ( currentUser ) ) {
2026-07-23 10:11:24 +00:00
const intl = require ( 1212 ) /* getSystemLocale */ . intl ;
let stringResult = intl . string ( require ( 1212 ) /* getSystemLocale */ . t [ "V5/GgC" ] ) ;
2026-07-20 16:05:17 +00:00
let str = "INVALID_ANIMATED_EMOJI_BODY" ;
}
obj = { errorMessage : stringResult , errorMessageName : str } ;
return obj ;
}
2026-07-23 10:11:24 +00:00
const intl2 = require ( 1212 ) /* getSystemLocale */ . intl ;
stringResult = intl2 . string ( require ( 1212 ) /* getSystemLocale */ . t [ "Q87rI/" ] ) ;
2026-07-20 16:05:17 +00:00
str = "INVALID_EXTERNAL_EMOJI_BODY" ;
} ,
_sendMessage ( arg0 , arg1 , arg2 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
let closure_2 = arg2 ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
let _location ;
let activity ;
let activityAction ;
let allowedMentions ;
let announcementSendOptions ;
let attachments ;
let attachments2 ;
let attachmentsToUpload ;
2026-07-23 10:11:24 +00:00
let c1 ;
let c13 ;
let c3 ;
2026-07-20 16:05:17 +00:00
let contentInventoryEntry ;
let flags ;
let invalidEmojis ;
let mediaMention ;
let onAttachmentUploadError ;
let poll ;
let publish ;
let sharedCustomTheme ;
let stickerIds ;
let tts ;
let withCheckpoint ;
2026-07-23 10:11:24 +00:00
let content ;
c1 = undefined ;
2026-07-20 16:05:17 +00:00
_location = undefined ;
2026-07-23 10:11:24 +00:00
c3 = undefined ;
2026-07-20 16:05:17 +00:00
stickerIds = undefined ;
let messageReference ;
poll = undefined ;
contentInventoryEntry = undefined ;
attachmentsToUpload = undefined ;
2026-07-23 10:11:24 +00:00
let c9 ;
2026-07-20 16:05:17 +00:00
let DEFAULT ;
let nonce ;
nonce = undefined ;
2026-07-23 10:11:24 +00:00
c13 = undefined ;
2026-07-20 16:05:17 +00:00
let obj ;
2026-07-23 10:11:24 +00:00
const promise = callback2 ( outer2_3 [ 65 ] ) ( outer1_0 ) ;
2026-07-20 16:05:17 +00:00
if ( null != promise ) {
2026-07-23 10:11:24 +00:00
let infoResult = outer2_52 ;
infoResult = outer2_52 . info ( "Converting channel to a private channel" ) ;
2026-07-20 16:05:17 +00:00
return promise . then ( ( arg0 ) = > {
2026-07-23 10:11:24 +00:00
outer3_52 . info ( "Finished converting channel to a private channel" ) ;
return outer3_56 . _sendMessage ( arg0 , outer2_1 , outer2_2 ) ;
2026-07-20 16:05:17 +00:00
} ) ;
} else {
2026-07-23 10:11:24 +00:00
infoResult = outer1_1 ;
content = outer1_1 . content ;
( { invalidEmojis , validNonShortcutEmojis : c1 , tts } = outer1_1 ) ;
2026-07-20 16:05:17 +00:00
infoResult = undefined !== tts && tts ;
2026-07-23 10:11:24 +00:00
( { activityAction , location : _location } = outer1_2 ) ;
( { inviteAnalyticsMetadata : c3 , stickerIds } = outer1_2 ) ;
messageReference = outer1_2 . messageReference ;
( { allowedMentions , poll } = outer1_2 ) ;
( { sharedCustomTheme , contentInventoryEntry } = outer1_2 ) ;
( { attachments , attachmentsToUpload } = outer1_2 ) ;
( { onAttachmentUploadError , announcementSendOptions , withCheckpoint , mediaMention , flags } = outer1_2 ) ;
2026-07-20 16:05:17 +00:00
let num2 = 0 ;
if ( null != flags ) {
num2 = flags ;
}
2026-07-23 10:11:24 +00:00
const tmp6 = outer2_4 ( callback2 ( outer2_3 [ 70 ] ) ( content ) , 2 ) ;
2026-07-20 16:05:17 +00:00
let tmp8 = content ;
let addFlagResult = num2 ;
if ( tmp6 [ 0 ] ) {
2026-07-23 10:11:24 +00:00
content = tmp7 ;
obj = callback ( outer2_3 [ 71 ] ) ;
addFlagResult = obj . addFlag ( num2 , outer2_35 . SUPPRESS_NOTIFICATIONS ) ;
2026-07-20 16:05:17 +00:00
tmp8 = tmp7 ;
}
2026-07-23 10:11:24 +00:00
let channel = outer2_19 . getChannel ( outer1_0 ) ;
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
const guild = outer2_21 . getGuild ( guild_id ) ;
let obj1 = callback ( outer2_3 [ 72 ] ) ;
2026-07-20 16:05:17 +00:00
let addFlagResult1 = addFlagResult ;
if ( obj1 . canSendGuildOfficialMessages ( guild , channel , "_sendMessage" ) ) {
2026-07-23 10:11:24 +00:00
let obj2 = callback ( outer2_3 [ 71 ] ) ;
addFlagResult1 = obj2 . addFlag ( addFlagResult , outer2_35 . IS_GUILD_OFFICIAL ) ;
2026-07-20 16:05:17 +00:00
}
let flag2 = false ;
2026-07-23 10:11:24 +00:00
const messageReference2 = outer1_2 . messageReference ;
2026-07-20 16:05:17 +00:00
let type ;
if ( null != messageReference2 ) {
type = messageReference2 . type ;
}
2026-07-23 10:11:24 +00:00
c9 = tmp28 ;
2026-07-20 16:05:17 +00:00
if ( "" === tmp8 ) {
if ( null == activityAction ) {
if ( null == stickerIds ) {
if ( null == poll ) {
if ( null == sharedCustomTheme ) {
if ( null == contentInventoryEntry ) {
if ( ! tmp28 ) {
if ( null == attachments ) {
if ( ! withCheckpoint ) {
2026-07-23 10:11:24 +00:00
if ( null == outer1_1 . components ) {
2026-07-20 16:05:17 +00:00
if ( null != arr ) {
if ( arr . length > 0 ) {
flag2 = true ;
}
}
return Promise . resolve ( ) ;
}
}
}
}
}
}
}
}
}
}
if ( null != messageReference ) {
2026-07-23 10:11:24 +00:00
DEFAULT = outer2_37 . REPLY ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
DEFAULT = outer2_37 . DEFAULT ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
nonce = outer1_2 . nonce ;
2026-07-20 16:05:17 +00:00
if ( null == nonce ) {
2026-07-23 10:11:24 +00:00
let obj3 = callback ( outer2_3 [ 52 ] ) ;
2026-07-20 16:05:17 +00:00
nonce = obj3 . createNonce ( ) ;
}
2026-07-23 10:11:24 +00:00
obj = { channelId : outer1_0 , content : tmp8 , tts : infoResult , type : DEFAULT , messageReference , allowedMentions } ;
2026-07-20 16:05:17 +00:00
let tmp44 ;
if ( 0 !== addFlagResult1 ) {
tmp44 = addFlagResult1 ;
}
obj . flags = tmp44 ;
obj . nonce = nonce ;
2026-07-23 10:11:24 +00:00
const tmp42 = callback2 ( outer2_3 [ 50 ] ) ;
obj . poll = callback ( outer2_3 [ 73 ] ) . createPollServerDataFromCreateRequest ( poll ) ;
2026-07-20 16:05:17 +00:00
obj . sharedCustomTheme = sharedCustomTheme ;
obj . mediaMention = mediaMention ;
2026-07-24 07:16:23 +00:00
obj . mentionGames = outer1_1 . mentionGames ;
2026-07-20 16:05:17 +00:00
const tmp42Result = tmp42 ( obj ) ;
2026-07-23 10:11:24 +00:00
if ( false !== outer1_2 . eagerDispatch ) {
let result = callback ( outer2_3 [ 74 ] ) . updateComboOnMessageSend ( outer1_0 , tmp42Result . id ) ;
2026-07-20 16:05:17 +00:00
if ( null != stickerIds ) {
2026-07-23 10:11:24 +00:00
const mapped = stickerIds . map ( ( arg0 ) = > outer3_16 . getStickerById ( arg0 ) ) ;
2026-07-20 16:05:17 +00:00
tmp42Result . sticker_items = mapped . filter ( ( arg0 ) = > null != arg0 ) ;
}
2026-07-23 10:11:24 +00:00
outer2_56 . receiveMessage ( outer1_0 , tmp42Result , true , outer1_2 ) ;
let obj7 = callback ( outer2_3 [ 74 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! outer2_53 ) {
2026-07-20 16:05:17 +00:00
if ( null != invalidEmojis ) {
if ( invalidEmojis . length > 0 ) {
2026-07-23 10:11:24 +00:00
outer2_53 = true ;
const validateMessageResult = outer2_56 . validateMessage ( invalidEmojis , outer2_27 . getCurrentUser ( ) , outer1_0 ) ;
outer2_56 . sendBotMessage ( outer1_0 , validateMessageResult . errorMessage , validateMessageResult . errorMessageName ) ;
2026-07-20 16:05:17 +00:00
}
}
}
obj = { } ;
if ( null != announcementSendOptions ) {
2026-07-23 10:11:24 +00:00
let SEND = callback ( outer2_3 [ 75 ] ) . MessageDataType . SEND_ANNOUNCEMENT ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
SEND = callback ( outer2_3 [ 75 ] ) . MessageDataType . SEND ;
2026-07-20 16:05:17 +00:00
}
obj . type = SEND ;
2026-07-23 10:11:24 +00:00
obj1 = { channelId : outer1_0 , content : tmp8 , nonce , tts : infoResult , message_reference : messageReference , allowed_mentions : allowedMentions , flags : addFlagResult1 , analyticsLocation : _location } ;
2026-07-20 16:05:17 +00:00
obj . message = obj1 ;
2026-07-23 10:11:24 +00:00
if ( null != outer1_1 . components ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . components = outer1_1 . components ;
2026-07-20 16:05:17 +00:00
}
if ( null != announcementSendOptions ) {
2026-07-24 07:16:23 +00:00
( { createThread : tmp76.message.create_thread , threadName : tmp76.message.title , publish } = announcementSendOptions ) ;
let tmp81 = null != publish ;
if ( tmp81 ) {
tmp81 = publish ;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
tmp76 . message . publish = tmp81 ;
2026-07-20 16:05:17 +00:00
}
if ( null != activityAction ) {
let session_id ;
if ( null != activityAction ) {
session_id = activityAction . activity . session_id ;
}
let sessionId = session_id ;
2026-07-23 10:11:24 +00:00
if ( activityAction . type !== outer2_45 . JOIN_REQUEST ) {
2026-07-20 16:05:17 +00:00
sessionId = session_id ;
2026-07-23 10:11:24 +00:00
if ( activityAction . type !== outer2_45 . STREAM_REQUEST ) {
2026-07-20 16:05:17 +00:00
sessionId = session_id ;
if ( null == session_id ) {
2026-07-23 10:11:24 +00:00
sessionId = outer2_18 . getSessionId ( ) ;
2026-07-20 16:05:17 +00:00
}
}
}
if ( null != sessionId ) {
obj2 = { type : activityAction . type , session_id : sessionId } ;
( { targetUserId : obj10.target_user_id , activity } = activityAction ) ;
2026-07-24 07:16:23 +00:00
if ( tmp87 ) {
2026-07-20 16:05:17 +00:00
obj2 . party_id = activity . party . id ;
}
2026-07-24 07:16:23 +00:00
tmp76 . message . application_id = activity . application_id ;
tmp76 . message . activity = obj2 ;
tmp87 = null != activity . party && null != activity . party . id ;
2026-07-20 16:05:17 +00:00
}
}
if ( null != poll ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . poll = poll ;
2026-07-20 16:05:17 +00:00
}
if ( null != sharedCustomTheme ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . shared_client_theme = sharedCustomTheme ;
2026-07-20 16:05:17 +00:00
}
if ( null != stickerIds ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . sticker_ids = stickerIds ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( outer2_12 . isEnabled ( ) ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . has_poggermode_enabled = true ;
2026-07-20 16:05:17 +00:00
}
if ( withCheckpoint ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . with_checkpoint = true ;
2026-07-20 16:05:17 +00:00
}
if ( null != contentInventoryEntry ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . content_inventory_entry = contentInventoryEntry ;
2026-07-20 16:05:17 +00:00
}
if ( null != mediaMention ) {
2026-07-24 07:16:23 +00:00
tmp76 . message . media_mention = mediaMention ;
2026-07-20 16:05:17 +00:00
}
2026-07-24 07:16:23 +00:00
if ( tmp97 ) {
tmp76 . message . attachments = attachments ;
2026-07-20 16:05:17 +00:00
}
if ( null != attachmentsToUpload ) {
infoResult = attachmentsToUpload ;
if ( arr . length > 0 ) {
2026-07-23 10:11:24 +00:00
infoResult = callback ;
infoResult = outer2_3 ;
2026-07-20 16:05:17 +00:00
obj3 = { } ;
2026-07-23 10:11:24 +00:00
infoResult = outer1_0 ;
obj3 . channelId = outer1_0 ;
2026-07-20 16:05:17 +00:00
obj3 . nonce = nonce ;
obj3 . items = attachmentsToUpload ;
obj3 . message = tmp42Result ;
2026-07-23 10:11:24 +00:00
infoResult = outer1_2 ;
infoResult = ! outer1_2 . doNotNotifyOnError ;
2026-07-20 16:05:17 +00:00
obj3 . shouldUploadFailureSendNotification = infoResult ;
2026-07-23 10:11:24 +00:00
infoResult = yield callback ( outer2_3 [ 76 ] ) . uploadMessageAttachments ( obj3 ) ;
2026-07-20 16:05:17 +00:00
if ( null != infoResult ) {
2026-07-23 10:11:24 +00:00
( { attachments : attachments2 , uploader : c13 } = infoResult ) ;
2026-07-20 16:05:17 +00:00
if ( flag2 ) {
infoResult = attachments2 ;
if ( null != attachments2 ) {
infoResult = attachments2 ;
}
}
infoResult = attachments2 ;
if ( null != attachments2 ) {
infoResult = attachments2 ;
2026-07-23 10:11:24 +00:00
obj . message . attachments = attachments2 . map ( ( id ) = > content ( outer3_3 [ 48 ] ) . getAttachmentPayload ( id , arg1 ) ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
let obj11 = callback ( outer2_3 [ 76 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
infoResult = globalThis ;
infoResult = new . target ;
infoResult = new . target ;
infoResult = new Promise ( ( arg0 , arg1 ) = > {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
2026-07-20 16:05:17 +00:00
const _undefined = arg1 ;
let closure_2 = Date . now ( ) ;
2026-07-23 10:11:24 +00:00
_undefined ( outer3_3 [ 75 ] ) . length ;
2026-07-20 16:05:17 +00:00
const rounded = Math . floor ( 10000 * Math . random ( ) ) ;
2026-07-23 10:11:24 +00:00
outer3_52 . info ( "Queueing message to be sent LogId:" + rounded ) ;
let obj = _undefined ( outer3_3 [ 75 ] ) ;
2026-07-20 16:05:17 +00:00
obj . enqueue ( obj , ( ok ) = > {
let applicationStatus ;
let body ;
let guildId ;
let userId ;
2026-07-23 10:11:24 +00:00
const callback = ok ;
2026-07-20 16:05:17 +00:00
if ( ok . ok ) {
2026-07-23 10:11:24 +00:00
let obj15 = callback2 ( outer4_3 [ 68 ] ) ;
obj15 . donateSentMessage ( callback , outer3_0 ) ;
2026-07-20 16:05:17 +00:00
let obj = { } ;
obj = { duration : message , queueSize : length } ;
obj . sendAnalytics = obj ;
2026-07-23 10:11:24 +00:00
obj . poll = outer1_6 ;
outer4_56 . receiveMessage ( outer3_0 , ok . body , true , obj ) ;
if ( null != outer3_2 . alsoForwardToChannelId ) {
let obj18 = callback2 ( outer4_3 [ 78 ] ) ;
let obj19 = callback ( outer4_3 [ 55 ] ) ;
const sendForwardResult = obj18 . sendForward ( obj19 . createMessageRecord ( ok . body ) , outer3_2 . alsoForwardToChannelId ) ;
obj18 . sendForward ( obj19 . createMessageRecord ( ok . body ) , outer3_2 . alsoForwardToChannelId ) . then ( ( ) = > {
2026-07-20 16:05:17 +00:00
let channelId ;
let destinationChannelId ;
let guildId ;
let referencedMessageId ;
const obj = { } ;
2026-07-23 10:11:24 +00:00
const body = ok . body ;
2026-07-20 16:05:17 +00:00
let id ;
if ( null != body ) {
id = body . id ;
}
obj . referencedMessageId = id ;
2026-07-23 10:11:24 +00:00
const body2 = ok . body ;
2026-07-20 16:05:17 +00:00
let guild_id ;
if ( null != body2 ) {
guild_id = body2 . guild_id ;
}
obj . guildId = guild_id ;
2026-07-23 10:11:24 +00:00
const body3 = ok . body ;
2026-07-20 16:05:17 +00:00
let channel_id ;
if ( null != body3 ) {
channel_id = body3 . channel_id ;
}
obj . channelId = channel_id ;
2026-07-23 10:11:24 +00:00
obj . destinationChannelId = outer4_2 . alsoForwardToChannelId ;
2026-07-20 16:05:17 +00:00
( { referencedMessageId , guildId , channelId , destinationChannelId } = obj ) ;
2026-07-23 10:11:24 +00:00
callback ( outer5_3 [ 40 ] ) . track ( outer5_29 . MESSAGE_ALSO_SEND_TO_CHANNEL_SENT , { referenced_message_id : referencedMessageId , guild_id : guildId , channel_id : channelId , destination_channel_id : destinationChannelId } ) ;
2026-07-20 16:05:17 +00:00
} ) . catch ( ( arg0 ) = > {
const obj = { } ;
2026-07-23 10:11:24 +00:00
const body = ok . body ;
2026-07-20 16:05:17 +00:00
let id ;
2026-07-23 10:11:24 +00:00
const combined = "Failed to forward thread message to parent channel LogId:" + outer1_4 ;
2026-07-20 16:05:17 +00:00
if ( null != body ) {
id = body . id ;
}
obj . referencedMessageId = id ;
2026-07-23 10:11:24 +00:00
obj . channelId = outer4_0 ;
obj . destinationChannelId = outer4_2 . alsoForwardToChannelId ;
2026-07-20 16:05:17 +00:00
obj . error = arg0 . toString ( ) ;
2026-07-23 10:11:24 +00:00
outer5_51 . log ( combined , obj ) ;
2026-07-20 16:05:17 +00:00
} ) ;
2026-07-23 10:11:24 +00:00
const nextPromise = obj18 . sendForward ( obj19 . createMessageRecord ( ok . body ) , outer3_2 . alsoForwardToChannelId ) . then ( ( ) = > {
2026-07-20 16:05:17 +00:00
let channelId ;
let destinationChannelId ;
let guildId ;
let referencedMessageId ;
const obj = { } ;
2026-07-23 10:11:24 +00:00
const body = ok . body ;
2026-07-20 16:05:17 +00:00
let id ;
if ( null != body ) {
id = body . id ;
}
obj . referencedMessageId = id ;
2026-07-23 10:11:24 +00:00
const body2 = ok . body ;
2026-07-20 16:05:17 +00:00
let guild_id ;
if ( null != body2 ) {
guild_id = body2 . guild_id ;
}
obj . guildId = guild_id ;
2026-07-23 10:11:24 +00:00
const body3 = ok . body ;
2026-07-20 16:05:17 +00:00
let channel_id ;
if ( null != body3 ) {
channel_id = body3 . channel_id ;
}
obj . channelId = channel_id ;
2026-07-23 10:11:24 +00:00
obj . destinationChannelId = outer4_2 . alsoForwardToChannelId ;
2026-07-20 16:05:17 +00:00
( { referencedMessageId , guildId , channelId , destinationChannelId } = obj ) ;
2026-07-23 10:11:24 +00:00
callback ( outer5_3 [ 40 ] ) . track ( outer5_29 . MESSAGE_ALSO_SEND_TO_CHANNEL_SENT , { referenced_message_id : referencedMessageId , guild_id : guildId , channel_id : channelId , destination_channel_id : destinationChannelId } ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
2026-07-23 10:11:24 +00:00
const request = outer4_9 . getRequest ( callback2 ( outer4_3 [ 60 ] ) . cast ( outer3_0 ) ) ;
2026-07-20 16:05:17 +00:00
if ( null != request ) {
( { guildId , userId , applicationStatus } = request ) ;
2026-07-23 10:11:24 +00:00
let obj1 = { guildId , channelId : outer3_0 , messageId : ok.body.id , joinRequestStatus : applicationStatus , joinRequestUserId : userId } ;
let result = callback ( outer4_3 [ 79 ] ) . trackMemberApplicationInterviewMessage ( obj1 ) ;
const obj22 = callback ( outer4_3 [ 79 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let result1 = outer4_11 . recordMessageSendApiResponse ( outer1_11 ) ;
if ( outer1_10 === outer4_37 . REPLY ) {
2026-07-20 16:05:17 +00:00
const id2 = ok . body . id ;
2026-07-23 10:11:24 +00:00
message = outer3_0 ;
message = outer1_5 ;
if ( null != outer1_5 ) {
const message_id = outer1_5 . message_id ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const pendingReplyActionSource = outer4_13 . getPendingReplyActionSource ( message ) ;
2026-07-20 16:05:17 +00:00
if ( "message_swipe" === pendingReplyActionSource ) {
message = null ;
if ( null != message_id ) {
2026-07-23 10:11:24 +00:00
message = outer4_23 ;
message = outer4_23 . getMessage ( message , message_id ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
message = outer4_19 ;
message = outer4_19 . getChannel ( message ) ;
message = outer4_27 ;
message = outer4_27 . getCurrentUser ( ) ;
message = callback2 ;
message = outer4_3 ;
message = outer4_29 ;
let obj2 = { message_id : id2 , channel_id : message } ;
2026-07-20 16:05:17 +00:00
message = undefined ;
if ( null != message ) {
message = message . guild_id ;
}
obj2 . guild_id = message ;
obj2 . swipe_action = "reply" ;
message = null != message ;
if ( message ) {
message = undefined ;
if ( null != message ) {
message = message . author . id ;
}
message = message . id === message ;
}
obj2 . is_own_message = message ;
2026-07-23 10:11:24 +00:00
message = callback2 ( outer4_3 [ 40 ] ) . track ( outer4_29 . MESSAGE_SWIPE_ACTION_SENT , obj2 ) ;
const obj26 = callback2 ( outer4_3 [ 40 ] ) ;
2026-07-20 16:05:17 +00:00
} else if ( "message_shortcut" === pendingReplyActionSource ) {
2026-07-23 10:11:24 +00:00
message = outer4_19 ;
message = outer4_19 . getChannel ( message ) ;
message = callback2 ;
message = outer4_3 ;
message = outer4_29 ;
2026-07-20 16:05:17 +00:00
let obj3 = { message_id : id2 , channel_id : message } ;
let guild_id ;
if ( null != message ) {
guild_id = message . guild_id ;
}
obj3 . guild_id = guild_id ;
obj3 . original_message_id = message_id ;
obj3 . action = "reply" ;
2026-07-23 10:11:24 +00:00
message = outer4_3 ;
const obj42 = callback2 ( outer4_3 [ 40 ] ) ;
2026-07-20 16:05:17 +00:00
message = undefined ;
if ( null != message ) {
message = message . guild_id ;
}
message = obj3 ;
2026-07-23 10:11:24 +00:00
message = Object . assign ( callback ( outer4_3 [ 35 ] ) . collectGuildAnalyticsMetadata ( message ) ) ;
message = callback ;
message = outer4_3 ;
const obj24 = callback ( outer4_3 [ 35 ] ) ;
2026-07-20 16:05:17 +00:00
message = obj3 ;
2026-07-23 10:11:24 +00:00
message = Object . assign ( callback ( outer4_3 [ 35 ] ) . collectChannelAnalyticsMetadata ( message ) ) ;
message = obj42 . track ( outer4_29 . MESSAGE_SHORTCUT_ACTION_SENT , obj3 ) ;
const obj25 = callback ( outer4_3 [ 35 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
message = callback2 ;
message = outer4_3 ;
const obj21 = callback2 ( outer4_3 [ 60 ] ) ;
let obj4 = { type : "SLOWMODE_RESET_COOLDOWN" } ;
message = outer4_26 ;
obj4 . slowmodeType = outer4_26 . SendMessage ;
message = outer3_0 ;
obj4 . channelId = outer3_0 ;
message = callback2 ( outer4_3 [ 49 ] ) . dispatch ( obj4 ) ;
const obj28 = callback2 ( outer4_3 [ 49 ] ) ;
let obj5 = { type : "EMOJI_TRACK_USAGE" } ;
message = callback2 ;
obj5 . emojiUsed = callback2 ;
message = callback2 ( outer4_3 [ 49 ] ) . dispatch ( obj5 ) ;
const obj30 = callback2 ( outer4_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
let obj6 = { type : "STICKER_TRACK_USAGE" } ;
message = rounded ;
obj6 . stickerIds = rounded ;
2026-07-23 10:11:24 +00:00
message = callback2 ( outer4_3 [ 49 ] ) . dispatch ( obj6 ) ;
const obj32 = callback2 ( outer4_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
const obj7 = { type : "LOCAL_MESSAGE_CREATE" } ;
2026-07-23 10:11:24 +00:00
let obj8 = { channel_id : outer3_0 } ;
message = outer4_27 ;
obj8 . author = outer4_27 . getCurrentUser ( ) ;
2026-07-20 16:05:17 +00:00
obj7 . message = obj8 ;
2026-07-23 10:11:24 +00:00
message = callback2 ( outer4_3 [ 49 ] ) . dispatch ( obj7 ) ;
let obj9 = { } ;
message = callback ;
obj9 . content = callback ;
obj9 . channelId = outer3_0 ;
2026-07-20 16:05:17 +00:00
obj9 . messageId = ok . body . id ;
message = closure_2 ;
let str15 = "chat_input" ;
let str16 = "chat_input" ;
if ( null != closure_2 ) {
str16 = closure_2 ;
}
obj9 . location = str16 ;
message = length ;
obj9 . inviteAnalyticsMetadata = length ;
2026-07-23 10:11:24 +00:00
message = ( function trackCodedLinks ( content ) {
let closure_0 ;
let closure_1 ;
let closure_2 ;
let closure_3 ;
2026-07-20 16:05:17 +00:00
let overrideProperties ;
( { channelId : closure_0 , messageId : closure_1 , location : closure_2 , inviteAnalyticsMetadata : closure_3 , overrideProperties } = content ) ;
if ( overrideProperties === undefined ) {
overrideProperties = { } ;
}
2026-07-23 10:11:24 +00:00
let id ;
id = outer5_18 . getId ( ) ;
const item = callback ( outer5_3 [ 30 ] ) ( content . content ) . forEach ( ( ) = > { . . . } ) ;
} ) ( obj9 ) ;
message = callback ;
message = outer3_0 ;
let id = ok . body . id ;
2026-07-20 16:05:17 +00:00
message = closure_2 ;
message = str15 ;
if ( null != closure_2 ) {
message = closure_2 ;
}
2026-07-23 10:11:24 +00:00
message = outer3_2 ;
2026-07-20 16:05:17 +00:00
message = id ;
2026-07-23 10:11:24 +00:00
message = ( function trackGiftCodes ( message , message2 , id , message3 , isGiftLinkSentOnBehalfOfUser ) {
const ok = message2 ;
let closure_1 = id ;
let closure_2 = message3 ;
let closure_3 = isGiftLinkSentOnBehalfOfUser ;
let obj = ok ( outer5_3 [ 44 ] ) ;
const item = ok ( outer5_3 [ 44 ] ) . findGiftCodes ( message ) . forEach ( ( ) = > { . . . } ) ;
} ) ( message , message , id , message , outer3_2 . isGiftLinkSentOnBehalfOfUser ) ;
if ( null != outer3_2 . gifMetadata ) {
message = outer3_2 ;
2026-07-20 16:05:17 +00:00
message = closure_2 ;
2026-07-23 10:11:24 +00:00
message = outer3_0 ;
2026-07-20 16:05:17 +00:00
if ( null != closure_2 ) {
str15 = closure_2 ;
}
2026-07-23 10:11:24 +00:00
message = outer4_19 ;
let channel = outer4_19 . getChannel ( message ) ;
2026-07-20 16:05:17 +00:00
if ( null != channel ) {
2026-07-23 10:11:24 +00:00
message = callback2 ;
message = outer4_3 ;
message = outer4_29 ;
2026-07-20 16:05:17 +00:00
let obj10 = { location : str15 , message_id : ok.body.id } ;
2026-07-23 10:11:24 +00:00
( { gif_provider : obj45.gif_provider , load_id : obj45.load_id , source_object : obj45.source_object , gif_url : obj45.gif_url , gif_id : obj45.gif_id } = outer3_2 . gifMetadata ) ;
message = callback ;
const obj44 = callback2 ( outer4_3 [ 40 ] ) ;
2026-07-20 16:05:17 +00:00
message = obj10 ;
2026-07-23 10:11:24 +00:00
message = Object . assign ( callback ( outer4_3 [ 35 ] ) . collectGuildAnalyticsMetadata ( channel . getGuildId ( ) ) ) ;
const obj46 = callback ( outer4_3 [ 35 ] ) ;
2026-07-20 16:05:17 +00:00
message = obj10 ;
2026-07-23 10:11:24 +00:00
message = Object . assign ( callback ( outer4_3 [ 35 ] ) . collectChannelAnalyticsMetadata ( channel ) ) ;
message = obj44 . track ( outer4_29 . MESSAGE_SENT_WITH_GIF , obj10 ) ;
const obj47 = callback ( outer4_3 [ 35 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
const obj11 = { } ;
2026-07-23 10:11:24 +00:00
message = outer3_0 ;
obj11 . channelId = outer3_0 ;
2026-07-20 16:05:17 +00:00
obj11 . messageId = ok . body . id ;
let attachments = ok . body . attachments ;
if ( null == attachments ) {
attachments = [ ] ;
}
obj11 . attachments = attachments ;
2026-07-23 10:11:24 +00:00
message = outer1_8 ;
obj11 . attachmentsToUpload = null != outer1_8 ? outer1_8 : [ ] ;
message = outer1_5 ;
obj11 . messageReference = outer1_5 ;
message = ( function trackClipsShared ( channelId ) {
2026-07-20 16:05:17 +00:00
let attachments ;
2026-07-23 10:11:24 +00:00
let closure_1 ;
2026-07-20 16:05:17 +00:00
channelId = channelId . channelId ;
( { messageId : closure_1 , attachments } = channelId ) ;
const attachmentsToUpload = channelId . attachmentsToUpload ;
let channel ;
2026-07-23 10:11:24 +00:00
let messageByReference ;
2026-07-20 16:05:17 +00:00
if ( attachments . length === attachmentsToUpload . length ) {
2026-07-23 10:11:24 +00:00
channel = outer5_19 . getChannel ( channelId ) ;
2026-07-20 16:05:17 +00:00
if ( null != channel ) {
2026-07-23 10:11:24 +00:00
messageByReference = outer5_14 . getMessageByReference ( tmp ) ;
2026-07-20 16:05:17 +00:00
const item = attachmentsToUpload . forEach ( ( ) = > { . . . } ) ;
}
}
2026-07-23 10:11:24 +00:00
} ) ( obj11 ) ;
message = outer1_13 ;
if ( null != outer1_13 ) {
message = callback2 ;
message = outer4_3 ;
2026-07-20 16:05:17 +00:00
let obj12 = { type : "UPLOAD_COMPLETE" } ;
2026-07-23 10:11:24 +00:00
message = outer3_0 ;
obj12 . channelId = outer3_0 ;
message = outer1_13 ;
obj12 . file = outer1_13 . _file ;
2026-07-20 16:05:17 +00:00
obj12 . aborted = false ;
2026-07-23 10:11:24 +00:00
message = callback2 ( outer4_3 [ 49 ] ) . dispatch ( obj12 ) ;
const obj40 = callback2 ( outer4_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
message = callback ;
message = callback ( ok ) ;
const obj34 = callback2 ( outer4_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
} else {
obj = { } ;
( { hasErr : obj.hasErr , status : obj.status , body } = ok ) ;
let code ;
if ( null != body ) {
code = body . code ;
}
obj . code = code ;
obj . error = ok . err ;
2026-07-23 10:11:24 +00:00
outer4_51 . log ( "Failed to send message" , obj ) ;
2026-07-20 16:05:17 +00:00
if ( ok . hasErr ) {
let flag = false ;
if ( "ABORTED" === ok . err . code ) {
flag = true ;
}
} else {
flag = false ;
if ( ok . status >= 400 ) {
flag = false ;
if ( ok . status < 500 ) {
flag = false ;
if ( ok . body ) {
2026-07-23 10:11:24 +00:00
if ( ok . body . code === outer4_28 . SLOWMODE_RATE_LIMITED ) {
2026-07-20 16:05:17 +00:00
const retry_after = ok . body . retry_after ;
let tmp22 = null != retry_after ;
if ( tmp22 ) {
tmp22 = retry_after > 0 ;
}
flag = false ;
if ( tmp22 ) {
2026-07-23 10:11:24 +00:00
obj6 = callback2 ( outer4_3 [ 49 ] ) ;
const obj13 = { type : "SLOWMODE_SET_COOLDOWN" , channelId : outer3_0 , slowmodeType : outer4_26.SendMessage , cooldownMs : retry_after * callback2 ( outer4_3 [ 80 ] ) . Millis . SECOND } ;
2026-07-20 16:05:17 +00:00
obj6 . dispatch ( obj13 ) ;
flag = false ;
}
} else {
2026-07-23 10:11:24 +00:00
message = callback ;
message = outer4_3 ;
const AUTOMOD_ERROR_CODES = callback ( outer4_3 [ 81 ] ) . AUTOMOD_ERROR_CODES ;
2026-07-20 16:05:17 +00:00
if ( AUTOMOD_ERROR_CODES . has ( ok . body . code ) ) {
2026-07-23 10:11:24 +00:00
obj3 = callback2 ( outer4_3 [ 49 ] ) ;
let obj14 = { type : "MESSAGE_SEND_FAILED_AUTOMOD" , messageData : outer1_14 } ;
2026-07-20 16:05:17 +00:00
obj15 = { code : ok.body.code , message : ok.body.message } ;
obj14 . errorResponseBody = obj15 ;
obj3 . dispatch ( obj14 ) ;
flag = false ;
2026-07-23 10:11:24 +00:00
} else if ( ok . body . code === outer4_28 . POGGERMODE_TEMPORARILY_DISABLED ) {
obj1 = callback2 ( outer4_3 [ 49 ] ) ;
let obj16 = { type : "POGGERMODE_TEMPORARILY_DISABLED" } ;
2026-07-20 16:05:17 +00:00
obj1 . dispatch ( obj16 ) ;
flag = false ;
} else {
2026-07-23 10:11:24 +00:00
message = outer4_28 ;
if ( ok . body . code === outer4_28 . EXPLICIT_CONTENT ) {
const EXPLICIT_CONTENT = outer4_48 . EXPLICIT_CONTENT ;
2026-07-20 16:05:17 +00:00
flag = false ;
} else {
2026-07-23 10:11:24 +00:00
let tmp9 = null != outer1_6 || outer1_9 ;
2026-07-20 16:05:17 +00:00
if ( ! tmp9 ) {
2026-07-23 10:11:24 +00:00
tmp9 = null != outer1_7 ;
2026-07-20 16:05:17 +00:00
}
flag = false ;
if ( ! tmp9 ) {
2026-07-23 10:11:24 +00:00
outer4_56 . sendClydeError ( outer3_0 , ok . body . code ) ;
2026-07-20 16:05:17 +00:00
flag = false ;
}
}
}
}
}
}
}
}
if ( flag ) {
2026-07-23 10:11:24 +00:00
outer4_56 . deleteMessage ( outer3_0 , outer1_12 , true ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
if ( null != outer1_13 ) {
obj8 = callback2 ( outer4_3 [ 49 ] ) ;
let obj17 = { type : "UPLOAD_FAIL" , channelId : outer3_0 , file : outer1_13._file , messageId : outer1_12 , reason : EXPLICIT_CONTENT , noSendFailed : true } ;
2026-07-20 16:05:17 +00:00
obj8 . dispatch ( obj17 ) ;
}
if ( ! ok . hasErr ) {
2026-07-23 10:11:24 +00:00
if ( EXPLICIT_CONTENT === outer4_48 . EXPLICIT_CONTENT ) {
let body2 = ok . body ;
2026-07-20 16:05:17 +00:00
let attachments1 ;
if ( null != body2 ) {
attachments1 = body2 . attachments ;
}
2026-07-23 10:11:24 +00:00
let result2 = outer4_56 . sendExplicitMediaClydeError ( outer3_0 , attachments1 , callback ( outer4_3 [ 53 ] ) . TrackMediaRedactionContext . EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED ) ;
const tmp37 = outer3_0 ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
obj10 = callback2 ( outer4_3 [ 49 ] ) ;
obj18 = { type : "MESSAGE_SEND_FAILED" , messageId : outer1_12 , channelId : outer3_0 , shouldNotify : ! outer3_2 . doNotNotifyOnError , reason : EXPLICIT_CONTENT } ;
2026-07-20 16:05:17 +00:00
obj10 . dispatch ( obj18 ) ;
2026-07-23 10:11:24 +00:00
obj12 = callback ( outer4_3 [ 77 ] ) ;
2026-07-20 16:05:17 +00:00
obj19 = { } ;
let status ;
if ( ! ok . hasErr ) {
status = ok . status ;
}
obj19 . failureCode = status ;
let message1 ;
if ( ok . hasErr ) {
message1 = ok . err . message ;
}
obj19 . errorMessage = message1 ;
2026-07-23 10:11:24 +00:00
let result3 = obj12 . logMessageSendFailure ( obj19 ) ;
obj14 = callback2 ( outer4_3 [ 75 ] ) ;
let result4 = obj14 . cancelPendingSendRequests ( outer3_0 ) ;
let item = result4 . forEach ( ( messageId ) = > {
outer5_51 . log ( "Cancelling pending message" , messageId . nonce ) ;
let obj = callback ( outer5_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_SEND_FAILED" , messageId : messageId.nonce , channelId : messageId.channelId } ;
obj . dispatch ( obj ) ;
} ) ;
}
2026-07-23 10:11:24 +00:00
callback2 ( ok ) ;
2026-07-20 16:05:17 +00:00
}
} , rounded ) ;
} ) ;
return infoResult ;
}
} ) ( ) ;
} ,
startEditMessage ( channelId , messageId , content , source ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_START_EDIT" , channelId , messageId , content , source } ;
obj . dispatch ( obj ) ;
} ,
startEditMessageRecord ( id , flags , source ) {
2026-07-23 10:11:24 +00:00
let obj = require ( 1360 ) /* hasFlag */ ;
2026-07-20 16:05:17 +00:00
if ( obj . hasFlag ( flags . flags , closure_35 . IS_COMPONENTS_V2 ) ) {
const components = flags . components ;
2026-07-23 10:11:24 +00:00
const found = components . filter ( ( type ) = > type . type === outer1_0 ( outer1_3 [ 82 ] ) . ComponentType . TEXT_DISPLAY ) ;
2026-07-20 16:05:17 +00:00
if ( found . length > 0 ) {
const mapped = found . map ( ( content ) = > content . content ) ;
const joined = mapped . join ( "\n" ) ;
obj = { type : "MESSAGE_START_EDIT" , channelId : id , messageId : flags.id , content : joined , source } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj ) ;
2026-07-20 16:05:17 +00:00
}
}
obj = { type : "MESSAGE_START_EDIT" , channelId : id , messageId : flags.id , content : flags.content , source } ;
2026-07-23 10:11:24 +00:00
importDefault ( 686 ) . dispatch ( obj ) ;
2026-07-20 16:05:17 +00:00
} ,
updateEditMessage ( channelId , textValue , richValue ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_UPDATE_EDIT" , channelId , textValue , richValue } ;
obj . dispatch ( obj ) ;
} ,
endEditMessage ( id , response ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_END_EDIT" , channelId : id , response } ;
obj . dispatch ( obj ) ;
} ,
editMessage ( id , id2 , parsed ) {
2026-07-23 10:11:24 +00:00
let dependencyMap ;
let importAll ;
let closure_0 = id ;
let closure_1 = id2 ;
( { content : importAll , components : dependencyMap } = parsed ) ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
let obj1 ;
2026-07-23 10:11:24 +00:00
if ( "message_swipe" === outer2_20 . getEditActionSource ( outer1_0 ) ) {
const channel = outer2_19 . getChannel ( tmp2 ) ;
let obj = callback2 ( outer2_3 [ 40 ] ) ;
obj = { message_id : outer1_1 , channel_id : tmp2 } ;
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 . swipe_action = "edit" ;
obj . is_own_message = true ;
2026-07-23 10:11:24 +00:00
obj . track ( outer2_29 . MESSAGE_SWIPE_ACTION_SENT , obj ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let obj2 = callback2 ( outer2_3 [ 83 ] ) ;
yield obj2 . unarchiveThreadIfNecessary ( outer1_0 ) ;
const message = outer2_23 . getMessage ( outer1_0 , outer1_1 ) ;
2026-07-20 16:05:17 +00:00
let tmp15 ;
if ( null != message ) {
2026-07-23 10:11:24 +00:00
if ( message . type === outer2_37 . REPLY ) {
const messageByReference = outer2_14 . getMessageByReference ( message . messageReference ) ;
if ( messageByReference . state === outer2_15 . LOADED ) {
2026-07-20 16:05:17 +00:00
const mentions = message . mentions ;
if ( ! mentions . includes ( messageByReference . message . author . id ) ) {
obj = { } ;
const _Object = Object ;
2026-07-23 10:11:24 +00:00
obj . parse = Object . values ( outer2_38 ) ;
2026-07-20 16:05:17 +00:00
obj . replied_user = false ;
tmp15 = obj ;
}
}
}
}
2026-07-23 10:11:24 +00:00
const message1 = outer2_23 . getMessage ( tmp12 , tmp13 ) ;
2026-07-20 16:05:17 +00:00
let hasFlagResult = null != message1 ;
if ( hasFlagResult ) {
2026-07-23 10:11:24 +00:00
hasFlagResult = message1 . hasFlag ( outer2_35 . CROSSPOSTED ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
obj1 = { channelId : tmp12 , messageId : tmp13 , content : outer1_2 , isCrossposted : hasFlagResult , allowed_mentions : tmp15 , components : outer1_3 } ;
obj2 = { type : callback ( outer2_3 [ 75 ] ) . MessageDataType . EDIT , message : obj1 } ;
callback2 ( outer2_3 [ 75 ] ) . enqueue ( obj2 , ( hasErr ) = > {
2026-07-20 16:05:17 +00:00
let hasItem = ! hasErr . hasErr ;
if ( hasItem ) {
2026-07-23 10:11:24 +00:00
const AUTOMOD_ERROR_CODES = obj1 ( outer3_3 [ 81 ] ) . AUTOMOD_ERROR_CODES ;
2026-07-20 16:05:17 +00:00
hasItem = AUTOMOD_ERROR_CODES . has ( hasErr . body . code ) ;
}
if ( hasItem ) {
2026-07-23 10:11:24 +00:00
let obj = { type : obj1 ( outer3_3 [ 75 ] ) . MessageDataType . EDIT , message : obj1 } ;
obj1 = callback ( outer3_3 [ 49 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_EDIT_FAILED_AUTOMOD" } ;
obj . messageData = obj ;
obj = { code : hasErr.body.code , message : hasErr.body.message } ;
obj . errorResponseBody = obj ;
obj1 . dispatch ( obj ) ;
}
2026-07-23 10:11:24 +00:00
const AccessibilityAnnouncer = obj1 ( outer3_3 [ 84 ] ) . AccessibilityAnnouncer ;
2026-07-20 16:05:17 +00:00
const announce = AccessibilityAnnouncer . announce ;
2026-07-23 10:11:24 +00:00
const intl = obj1 ( outer3_3 [ 46 ] ) . intl ;
2026-07-20 16:05:17 +00:00
const string = intl . string ;
2026-07-23 10:11:24 +00:00
const t = obj1 ( outer3_3 [ 46 ] ) . t ;
2026-07-20 16:05:17 +00:00
if ( hasErr . hasErr ) {
announce ( string ( t . Atp7FP ) ) ;
} else if ( hasItem ) {
announce ( string ( t . Hym4ix ) ) ;
} else {
2026-07-23 10:11:24 +00:00
announce ( string ( t [ "0x1HBD" ] ) ) ;
2026-07-20 16:05:17 +00:00
}
let tmp14 ;
if ( ! hasErr . hasErr ) {
tmp14 = hasErr ;
}
2026-07-23 10:11:24 +00:00
outer3_56 . endEditMessage ( outer2_0 , tmp14 ) ;
obj1 = { channelId : outer2_0 , messageId : outer2_1 } ;
outer3_56 . focusMessage ( obj1 ) ;
2026-07-20 16:05:17 +00:00
} ) ;
} ) ( ) ;
} ,
2026-07-23 10:11:24 +00:00
suppressEmbeds ( closure_0 , closure_1 ) {
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let obj = callback2 ( outer2_3 [ 83 ] ) ;
yield obj . unarchiveThreadIfNecessary ( outer1_0 ) ;
const message = outer2_23 . getMessage ( outer1_0 , outer1_1 ) ;
2026-07-20 16:05:17 +00:00
if ( null != message ) {
2026-07-23 10:11:24 +00:00
const HTTP = callback ( outer2_3 [ 54 ] ) . HTTP ;
obj = { url : outer2_30.MESSAGE ( outer1_0 , outer1_1 ) } ;
obj = { flags : callback ( outer2_3 [ 71 ] ) . setFlag ( message . flags , outer2_35 . SUPPRESS_EMBEDS , true ) } ;
2026-07-20 16:05:17 +00:00
obj . body = obj ;
obj . oldFormErrors = true ;
2026-07-23 10:11:24 +00:00
const obj4 = callback ( outer2_3 [ 71 ] ) ;
obj . rejectWithError = callback ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) ;
2026-07-20 16:05:17 +00:00
HTTP . patch ( obj ) ;
2026-07-23 10:11:24 +00:00
const obj5 = callback ( outer2_3 [ 54 ] ) ;
2026-07-20 16:05:17 +00:00
}
} ) ( ) ;
} ,
patchMessageGuildOfficial ( id , id2 , arg2 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = id ;
let closure_1 = id2 ;
let closure_2 = arg2 ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let obj = callback2 ( outer2_3 [ 83 ] ) ;
yield obj . unarchiveThreadIfNecessary ( outer1_0 ) ;
const message = outer2_23 . getMessage ( outer1_0 , outer1_1 ) ;
2026-07-20 16:05:17 +00:00
if ( null != message ) {
2026-07-23 10:11:24 +00:00
const HTTP = callback ( outer2_3 [ 54 ] ) . HTTP ;
obj = { url : outer2_30.MESSAGE ( outer1_0 , outer1_1 ) } ;
obj = { flags : callback ( outer2_3 [ 71 ] ) . setFlag ( message . flags , outer2_35 . IS_GUILD_OFFICIAL , outer1_2 ) } ;
2026-07-20 16:05:17 +00:00
obj . body = obj ;
obj . oldFormErrors = true ;
2026-07-23 10:11:24 +00:00
const obj4 = callback ( outer2_3 [ 71 ] ) ;
obj . rejectWithError = callback ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) ;
2026-07-20 16:05:17 +00:00
HTTP . patch ( obj ) ;
2026-07-23 10:11:24 +00:00
const obj5 = callback ( outer2_3 [ 54 ] ) ;
2026-07-20 16:05:17 +00:00
}
} ) ( ) ;
} ,
2026-07-23 10:11:24 +00:00
patchMessageAttachments ( closure_0 , id , found ) {
let closure_1 = id ;
let closure_2 = found ;
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
let obj = callback2 ( outer2_3 [ 83 ] ) ;
yield obj . unarchiveThreadIfNecessary ( outer1_0 ) ;
const HTTP = callback ( outer2_3 [ 54 ] ) . HTTP ;
obj = { url : outer2_30.MESSAGE ( outer1_0 , outer1_1 ) , body : obj , oldFormErrors : true } ;
obj = { attachments : outer1_2 , rejectWithError : callback ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) } ;
2026-07-20 16:05:17 +00:00
HTTP . patch ( obj ) ;
} ) ( ) ;
} ,
deleteMessage ( arg0 , arg1 ) {
let flag = arg2 ;
2026-07-23 10:11:24 +00:00
let closure_0 = arg0 ;
let closure_1 = arg1 ;
2026-07-20 16:05:17 +00:00
if ( arg2 === undefined ) {
flag = false ;
}
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
function dispatchDelete() {
let obj = callback ( outer3_3 [ 49 ] ) ;
obj = { type : "MESSAGE_DELETE" , id : outer2_1 , channelId : outer2_0 } ;
2026-07-20 16:05:17 +00:00
obj . dispatch ( obj ) . then ( ( ) = > {
2026-07-23 10:11:24 +00:00
const AccessibilityAnnouncer = callback ( outer4_3 [ 84 ] ) . AccessibilityAnnouncer ;
const intl = callback ( outer4_3 [ 46 ] ) . intl ;
AccessibilityAnnouncer . announce ( intl . string ( callback ( outer4_3 [ 46 ] ) . t . RYMs7s ) ) ;
2026-07-20 16:05:17 +00:00
} ) ;
}
2026-07-23 10:11:24 +00:00
if ( outer1_2 ) {
2026-07-20 16:05:17 +00:00
dispatchDelete ( ) ;
} else {
2026-07-23 10:11:24 +00:00
let obj = callback2 ( outer2_3 [ 83 ] ) ;
yield obj . unarchiveThreadIfNecessary ( outer1_0 ) ;
const HTTP = callback ( outer2_3 [ 54 ] ) . HTTP ;
obj = { url : outer2_30.MESSAGE ( outer1_0 , outer1_1 ) , oldFormErrors : true , rejectWithError : callback ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) } ;
const obj3 = callback ( outer2_3 [ 54 ] ) ;
2026-07-20 16:05:17 +00:00
HTTP . del ( obj ) . then ( ( ) = > {
dispatchDelete ( ) ;
} ) ;
const delResult = HTTP . del ( obj ) ;
}
} ) ( ) ;
} ,
dismissAutomatedMessage ( message ) {
const self = this ;
if ( null != message . loggingName ) {
2026-07-25 08:10:48 +00:00
let obj = importDefault ( 4325 ) ;
2026-07-20 16:05:17 +00:00
obj = { message_name : message.loggingName , message_author : message.author.username } ;
obj . trackWithMetadata ( constants . AUTOMATED_MESSAGE_DISMISSED , obj ) ;
}
2026-07-25 08:10:48 +00:00
const result = require ( 6127 ) /* dismissGiftIntent */ . logGiftIntentMessageDismissed ( message . channel_id , message . id ) ;
2026-07-20 16:05:17 +00:00
self . deleteMessage ( message . channel_id , message . id , true ) ;
} ,
revealMessage ( id , messageId ) {
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "MESSAGE_REVEAL" , channelId : id , messageId } ;
obj . dispatch ( obj ) ;
} ,
2026-07-23 10:11:24 +00:00
crosspostMessage ( closure_0 , closure_1 ) {
2026-07-20 16:05:17 +00:00
return callback ( async ( ) = > {
2026-07-23 10:11:24 +00:00
const HTTP = callback ( outer2_3 [ 54 ] ) . HTTP ;
const obj = { url : outer2_30.MESSAGE_CROSSPOST ( outer1_0 , outer1_1 ) , oldFormErrors : true , failImmediatelyWhenRateLimited : true , rejectWithError : callback ( outer2_3 [ 54 ] ) . rejectWithMigratedError ( ) } ;
2026-07-20 16:05:17 +00:00
return yield HTTP . post ( obj ) ;
} ) ( ) ;
} ,
trackInvite
} ;
2026-07-23 10:11:24 +00:00
let result = require ( "_classCallCheck" ) . fileFinishedImporting ( "actions/MessageActionCreators.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default obj14 ;