🐛 Fix joining failed joining one of channel fail will stop entire process
This commit is contained in:
parent
05de2e1799
commit
b65a87e38b
@ -99,15 +99,14 @@ export default function Realm({ realm }: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function joinChannels() {
|
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', {
|
await sni.post('/cgi/im/channels/' + realm.alias + '/' + chan + '/members', {
|
||||||
related: user.account!.name,
|
related: user.account!.name,
|
||||||
})
|
})
|
||||||
|
} catch (err: any) {
|
||||||
|
console.error(err)
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
|
||||||
console.error(err)
|
|
||||||
setError(err.toString())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user