| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import { useChannelStore } from '../home/store/channelStore' |
| | | import { ImConversationType } from './constants' |
| | | |
| | | /** |
| | | * æå»ºé¢éä¼è¯æè¿°ï¼type / targetId / name / avatarï¼ |
| | | * |
| | | * ä¼å
ç¨ channelStore æå°ççå®åç§° / 头åï¼æ¬å°ç¼åè¿æ²¡æå°æ¶éå为ãé¢é Nãå 使æ¡ã |
| | | * æ½å° utils/channel.ts åï¼useMessagePuller / websocketStore å
±ç¨åä¸ä»½å ä½é»è¾ï¼é¿å
å¤å¤å¤å¶ï¼ç±»ä¼¼ utils/user.ts åæµç§°çå·¥å
·éã |
| | | */ |
| | | export const buildChannelConversationStub = (channelId: number) => { |
| | | const channel = useChannelStore().getChannel(channelId) |
| | | return { |
| | | type: ImConversationType.CHANNEL, |
| | | targetId: channelId, |
| | | name: channel?.name || `é¢é ${channelId}`, |
| | | avatar: channel?.avatar || '' |
| | | } |
| | | } |