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