Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add suggested channels greeting message #106
Add suggested channels greeting message #106
Changes from all commits
ca17304
ea3fffb
87277d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to worried about a double for loop but you could avoid the lookup if you converted the list of channels into a set, or a key value pair.
But I think the naming should be clearer:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how you got that the channel can be indexed...
I think you need to compare the channel['name'] to the suggestion. But you should also exclude the channel when
channel['is_private'] == True
as we don't want to make the names of these channels visible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanks for catching that. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the above, ignore the
is_private
part but we still need to make sure this works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not very clear at first what this is doing.
For some profile fields they are lists, and some profile fields they are single items.
This is because we are storing lists of items as strings joined by commas.
Stylistically I think something like this is a bit clearer.
I don't remember if the api has a way to filter some of the profile values, or request the api to split the values when they have multiple items into a list.
It would be better if we stored them in the database as a 1:N relationship and then had the api return a list in the json.