import{u as i}from"./vue-router-7f882520.js";import{l as c,I as u,q as v}from"./index-ae60edf9.js";function d(){const a=i(),e=c(),s=async({sourceID:o,sessionType:t})=>{let r=e.conversationList.find(n=>n.userID===o||n.groupID===o);if(!r)try{r=(await u.getOneConversation({sourceID:o,sessionType:t})).data}catch(n){v({error:n})}return r};return{toSpecifiedConversation:async o=>{const t=await s(o);!t||e.currentConversation.conversationID===t.conversationID||(e.updateCurrentConversation({...t}),a.push("chat"))}}}export{d as u};
