Skip to content

Commit

Permalink
Handle special case for Slack User Group in search
Browse files Browse the repository at this point in the history
- Adjust Slack User Group channel search pending migration
- Add TODO to remove hack after migration to new system
  • Loading branch information
mastercactapus committed Jul 12, 2024
1 parent 5c2f4eb commit 80174a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions graphql2/graphqlapp/destinationtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ func (q *Query) DestinationFieldSearch(ctx context.Context, input graphql2.Desti
opts.Search = *input.Search
}

if input.DestType == destSlackUG && input.FieldID == slack.FieldSlackChannelID {
// Hack: Slack User Group channel search is a special case, until
// it is migrated to the new search system.
//
// TODO: remove this when slack user group is moved to the nfydest.Registry.
input.DestType = slack.DestTypeSlackChannel
}

res, err := q.DestReg.SearchField(ctx, input.DestType, input.FieldID, opts)
if err != nil {
return nil, err
Expand Down

0 comments on commit 80174a8

Please sign in to comment.