File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ func newWithXOXP(authProvider auth.ValueAuth) *ApiProvider {
108108 if err != nil {
109109 panic (err )
110110 } else {
111+ ap .authProvider = & authProvider
111112 ap .authResponse = & slack2.AuthTestResponse {
112113 URL : res .URL ,
113114 Team : res .Team ,
@@ -309,6 +310,7 @@ func (ap *ApiProvider) GetChannels(ctx context.Context, channelTypes []string) [
309310 if ap .authResponse .EnterpriseID == "" {
310311 chans1 , nextcur , err = clientGeneric .GetConversationsContext (ctx , params )
311312 if err != nil {
313+ log .Printf ("Failed to fetch channels: %v" , err )
312314 break
313315 }
314316 for _ , channel := range chans1 {
@@ -334,9 +336,14 @@ func (ap *ApiProvider) GetChannels(ctx context.Context, channelTypes []string) [
334336 } else {
335337 chans2 , _ , err = clientE .GetConversationsContext (ctx , nil )
336338 if err != nil {
339+ log .Printf ("Failed to fetch channels: %v" , err )
337340 break
338341 }
339342 for _ , channel := range chans2 {
343+ if params .ExcludeArchived && channel .IsArchived {
344+ continue
345+ }
346+
340347 ch := mapChannel (
341348 channel .ID ,
342349 channel .Name ,
You can’t perform that action at this time.
0 commit comments