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) { if (!props.group) {
return return
} }
// TODO @AI next newValue const newValue = !!value
const next = !!value
try { try {
await muteAll({ groupId: props.group.id, mutedAll: next }) await muteAll({ groupId: props.group.id, mutedAll: newValue })
message.success(next ? '已开启全群禁言' : '已关闭全群禁言') message.success(newValue ? '已开启全群禁言' : '已关闭全群禁言')
emit('reload') emit('reload')
} catch { } catch {
message.error('操作失败') message.error('操作失败')

View File

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