🐛 Fix joining failed joining one of channel fail will stop entire process

This commit is contained in:
LittleSheep 2025-02-10 22:28:58 +08:00
parent 05de2e1799
commit b65a87e38b

View File

@ -99,15 +99,14 @@ export default function Realm({ realm }: any) {
}
async function joinChannels() {
try {
for (const chan of checkedChannels) {
for (const chan of checkedChannels) {
try {
await sni.post('/cgi/im/channels/' + realm.alias + '/' + chan + '/members', {
related: user.account!.name,
})
} catch (err: any) {
console.error(err)
}
} catch (err: any) {
console.error(err)
setError(err.toString())
}
}