feat(im): 清理一些 TODO 的修复

im
YunaiV 2026-05-05 22:04:45 +08:00
parent a9f54fdee1
commit 4e181564b8
2 changed files with 12 additions and 14 deletions

View File

@ -608,11 +608,10 @@ async function onMuteAllChange(value: boolean | string | number) {
if (!props.group) {
return
}
// TODO @AI next newValue
const next = !!value
const newValue = !!value
try {
await muteAll({ groupId: props.group.id, mutedAll: next })
message.success(next ? '已开启全群禁言' : '已关闭全群禁言')
await muteAll({ groupId: props.group.id, mutedAll: newValue })
message.success(newValue ? '已开启全群禁言' : '已关闭全群禁言')
emit('reload')
} catch {
message.error('操作失败')

View File

@ -725,17 +725,16 @@ export const useGroupStore = defineStore('imGroupStore', {
}
})
// TODO @AIvo 改成 group更好理解点
function convertGroup(vo: ImGroupRespVO): Group {
function convertGroup(group: ImGroupRespVO): Group {
return {
id: vo.id,
name: vo.name,
avatar: vo.avatar,
notice: vo.notice,
ownerUserId: vo.ownerUserId,
pinnedMessages: vo.pinnedMessages?.map(convertGroupMessageVO),
mutedAll: vo.mutedAll,
banned: vo.banned
id: group.id,
name: group.name,
avatar: group.avatar,
notice: group.notice,
ownerUserId: group.ownerUserId,
pinnedMessages: group.pinnedMessages?.map(convertGroupMessageVO),
mutedAll: group.mutedAll,
banned: group.banned
}
}