Browse Source

修改客服前端私聊保留

master
[yxf] 3 weeks ago
parent
commit
65fac597cb
  1. 18
      im-web/src/store/chatStore.js

18
im-web/src/store/chatStore.js

@ -374,15 +374,15 @@ export default defineStore('chatStore', {
// 刷新免打扰状态
const friendStore = useFriendStore();
const onlineFriendIds = friendStore.onlineFriendIds || [];
chats = chats.filter(chat => {
// 保留群聊
if (chat.type === 'GROUP') return true;
// 私聊只保留在线好友的
if (chat.type === 'PRIVATE') {
return onlineFriendIds.includes(chat.targetId);
}
return true;
});
// chats = chats.filter(chat => {
// // 保留群聊
// if (chat.type === 'GROUP') return true;
// // 私聊只保留在线好友的
// if (chat.type === 'PRIVATE') {
// return onlineFriendIds.includes(chat.targetId);
// }
// return true;
// });
const groupStore = useGroupStore();
chats.forEach(chat => {
if (chat.type == 'PRIVATE') {

Loading…
Cancel
Save