Module 202195

797 characters · in 0e45183c1736743b.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>m});var l=n(17928),i=n(6161),s=n(890615),r=n(450149),a=n(616356),o=n(734057),c=n(576705),u=n(290863),d=n(977997),h=n(832384);function m(e){let t=(0,h.JM)(e),n=(0,l.bG)([d.A,o.A,c.A],()=>{if(!t||e.author_type!==i.ContentInventoryAuthorType.USER)return null;let n=d.A.getVoiceStateForUser(e.author_id),l=o.A.getChannel(n?.channelId),r="channel_id"in e?e.channel_id:null;return(null==r||r===n?.channelId)&&(null==l||(0,s.A)(l,c.A))?l:null},[e,t]),m=(0,l.bG)([u.A],()=>null!=t?u.A.getPrimaryActivity(e.author_id,n?.guild_id):null,[n,e.author_id,t]),p=(0,l.bG)([a.A],()=>t?a.A.getStreamForUser(e.author_id,n?.guild_id):null,[n,e.author_id,t]),{previewUrl:f}=(0,r.A)(p?.guildId,p?.channelId,p?.ownerId);return{channel:n,activity:m,streamPreviewUrl:f,stream:p}}}