File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
plugins/telegram-resources/src/components Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 2727 let connection: Integration
2828 let channels: TelegramChannelConfig [] = []
2929 let isLoading = true
30- let error: string | null = null
31- let isRefreshing = false
3230 let status: Status | undefined
3331
3432 let integrationClient: IntegrationClient | undefined
4644 connection = connectionResult
4745 channels = (await listChannels (connection ?.data ?.phone )).map ((channel ) => ({
4846 ... channel ,
49- access: ' private' , // Default access since access property doesn't exist on TelegramChannel
5047 syncEnabled: channel .mode === ' sync'
5148 }))
5249 isLoading = false
5350 status = OK
5451 subscribe ()
5552 } catch (err ) {
5653 status = ERROR
57- error = err instanceof Error ? err .message : ' Failed to load channels'
5854 isLoading = false
5955 console .error (' Error loading channels:' , err )
6056 }
8278 if (updatedChannel != null ) {
8379 return {
8480 ... channel ,
85- access: updatedChannel .access ?? channel .access ,
8681 syncEnabled: updatedChannel .enabled
8782 }
8883 }
9691
9792 async function refresh (): Promise <void > {
9893 try {
99- isRefreshing = true
10094 if (integrationClient === undefined ) {
10195 integrationClient = await getIntegrationClient ()
10296 }
10599 }
106100 channels = (await listChannels (connection .data .phone )).map ((channel ) => ({
107101 ... channel ,
108- access: ' private' , // Default access since access property doesn't exist on TelegramChannel
109102 syncEnabled: channel .mode === ' sync'
110103 }))
111104 } catch (err : any ) {
112105 console .error (' Error refresh channels:' , err .message )
113- } finally {
114- isRefreshing = false
115106 }
116107 }
117108
You can’t perform that action at this time.
0 commit comments