Skip to content
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

make getChannelIdTeam behave like GetChannelId for groups #873

Merged
merged 5 commits into from
Sep 7, 2019

Conversation

bucko909
Copy link
Contributor

@bucko909 bucko909 commented Aug 13, 2019

GetChannelId will support names generated from query groups when a team is not set, but not when a team is set since it falls through to getChannelIdTeam which has a different inner loop. This pull makes the two implementations do the same thing.

@bucko909
Copy link
Contributor Author

I believe this would be better factored out into some helper function, but I'm not really sure where to put it. I came across the discrepancy while testing 42wim/matterircd#255.

@bucko909
Copy link
Contributor Author

OK, so it looks like I've a choice: fail lint ("should use ReplaceAll") or fail tests (simply won't build on go before ReplaceAll was added). Your choice. :)

Copy link
Owner

@42wim 42wim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR!
Yes, this is a tricky one with the linter, i'd like to keep go1.11 compatibility for now, could you add a // nolint:gocritic after all of the Replace lines, so the linter will ignore this. Sorry for the red tape :)

matterclient/channels.go Show resolved Hide resolved
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

matterclient/channels.go Outdated Show resolved Hide resolved
@bucko909
Copy link
Contributor Author

OK, that looks like it passes CI for you. I even made you a nice refactor.

@bucko909
Copy link
Contributor Author

Github believes there are changes requested, but I changed the lines in question and resolved the rquest. Am I missing something, or is Github?

@42wim
Copy link
Owner

42wim commented Sep 7, 2019

Sorry for the delay!
Thanks for your work 👍

@42wim 42wim merged commit 4cc1192 into 42wim:master Sep 7, 2019
42wim pushed a commit that referenced this pull request Sep 7, 2019
#873)

GetChannelId will support names generated from query groups when a team is not set,
but not when a team is set since it falls through to getChannelIdTeam which has a different inner loop. i
This pull makes the two implementations do the same thing.
@bucko909 bucko909 deleted the consistency branch December 3, 2019 15:34
zeridon pushed a commit to zeridon/matterbridge that referenced this pull request Feb 12, 2020
42wim#873)

GetChannelId will support names generated from query groups when a team is not set,
but not when a team is set since it falls through to getChannelIdTeam which has a different inner loop. i
This pull makes the two implementations do the same thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants