Build 618874stable
Module 402860
1,968 characters · in no known chunkDependencies
Required by (57)
388844682381400112753116058137728149741161673189552206835217424219317241188243949247933248550273147284675322789343963365990425663442228462463465558496879497600516259521376561446577593580763584904622868626148634409639784640132716936720882722868727584744753746793747119803281806677808261839534839785851588852105855210865830900649908816953759
Lazily required by (1)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.r(t),n.d(t,{openUserProfileModal:()=>f,closeUserProfileModal:()=>p});var i=n(778712),r=n(228366),a=n(803306),s=n(927813),l=n(86070),o=n(517164);let d=s.A.Millis.MINUTE;var c=n(626584),u=n(287809);let _=(0,n(945810).mj)({name:"2026-09-profile-link-fetch",kind:"user",defaultConfig:{enabled:!1},variations:{1:{enabled:!0}}});var E=n(903209);let A=(0,i.FT)(i._3.SIZE_120),h=new c.A("UserProfileModalActionCreators");async function I(e){try{await function(e){if(o.A.isFetchingUserOutbox(e))return;let t=o.A.getUserOutbox(e)?.lastFetched??0;if(!(Date.now()-t<d))return(0,l.r7)(e,void 0)}(e)}catch(t){h.log(`Failed to fetch content inventory outbox for ${e}:`,t)}}async function f(e){let{userId:t,guildId:n,originGuildId:i,channelId:s,messageId:l,roleId:o,sessionId:d,joinRequestId:c,tabSection:f,scrollTarget:p,hideRestrictedProfile:T,sourceAnalyticsLocations:g,appContext:m,customStatusPrompt:S=null,onModalOpen:N}=e,C=Date.now(),O=u.default.getUser(t);if(I(t),null==O)try{await (0,a.fetchProfile)(t,{type:"modal",guildId:n??void 0,withMutualFriendsCount:!0,withMutualFriends:!1,withMutualGuilds:!0,joinRequestId:c})}catch(e){if(h.log(`Failed to fetch profile for ${t}:`,e),function(e){let{enabled:t}=_.getConfig({location:e});return t}("UserProfileModalActionCreators"))try{await (0,a.getUser)(t)}catch(e){h.log(`Failed to fetch user ${t}:`,e)}}else(0,E.A)(O.id,O.getAvatarURL(void 0,A),{type:"modal",guildId:n??void 0,withMutualFriendsCount:!O.bot,withMutualFriends:!1,withMutualGuilds:!0,joinRequestId:c}).catch(e=>{h.log(`Failed to fetch profile for ${t}:`,e)});r.h.dispatch({type:"USER_PROFILE_MODAL_OPEN",userId:t,guildId:n??void 0,originGuildId:i??void 0,channelId:s??void 0,messageId:l??void 0,roleId:o??void 0,sessionId:d??void 0,openedAt:C,customStatusPrompt:S,tabSection:f,scrollTarget:p,hideRestrictedProfile:T,sourceAnalyticsLocations:g,appContext:m,onModalOpen:N})}function p(){r.h.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}}