Loading
function(e,t,n){"use strict";n.d(t,{p:()=>d});var l=n(308528),i=n(493336),s=n(355622),r=n(428249),a=n(451909),o=n(734057),u=n(806150),c=n(381941);async function d(e){let{userId:t,content:n,location:d,openChannel:m=!0,whenReady:h=!1,entry:p,nonce:f}=e,{valid:g,failureReason:E}=await (0,u.i)({type:s.oU.NORMAL,content:n,channel:null});if(!g)throw Error(E);let A=m?await l.A.openPrivateChannel({recipientIds:t,location:d}):await l.A.getOrEnsurePrivateChannel(t),C=o.A.getChannel(A);if(null==C)throw Error("Failed to open private channel");if(null!=p)(0,r.d)({channel:C,content:n,entry:p,whenReady:h,doNotNotifyOnError:!1,location:c.Hx.USER_PROFILE});else{let e=a.Ay.parse(C,n);return i.A.sendMessage(C.id,e,h,{location:c.Hx.USER_PROFILE,nonce:f})}}}