🐛 Fix joining failed joining one of channel fail will stop entire process
This commit is contained in:
		| @@ -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) { |       } catch (err: any) { | ||||||
|         console.error(err) |         console.error(err) | ||||||
|       setError(err.toString()) |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user