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

Fix member ordering for creating member based channels #591

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

ferhatelmas
Copy link
Contributor

@ferhatelmas ferhatelmas commented Jan 21, 2021

since it's sorted now.

@ferhatelmas
Copy link
Contributor Author

Btw, it is a unit test than an integration test, we could remove it too since covered.

@@ -123,7 +123,7 @@ describe('Channels - Constructor', function () {

it('short version with options', function (done) {
const channel = client.channel('messaging', { members: ['tommaso', 'thierry'] });
expect(channel.data).to.eql({ members: ['tommaso', 'thierry'] });
expect(channel.data).to.eql({ members: ['thierry', 'tommaso'] });
Copy link
Contributor

Choose a reason for hiding this comment

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

this test seems to be a better fit for unit tests. is this due to recent changes? the member order should remain the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it comes from member based channel creation fix.

I agree with unit.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I see, the sort is applied in place, I think it's better to revert that change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make a fix to sort the copy and move this test to unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh, updated this one

@github-actions
Copy link
Contributor

Size Change: -67 B (0%)

Total Size: 214 kB

Filename Size Change
dist/browser.es.js 45.9 kB -16 B (0%)
dist/browser.full-bundle.min.js 29.6 kB -2 B (0%)
dist/browser.js 46.5 kB -16 B (0%)
dist/index.es.js 45.9 kB -16 B (0%)
dist/index.js 46.5 kB -17 B (0%)

compressed-size-action

@ferhatelmas ferhatelmas changed the title Fix member ordering Fix member ordering for creating member based channels Jan 21, 2021
Copy link
Contributor

@mahboubii mahboubii left a comment

Choose a reason for hiding this comment

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

🌮

@ferhatelmas ferhatelmas merged commit 11a4d4a into master Jan 21, 2021
@ferhatelmas ferhatelmas deleted the fix-member-order branch January 21, 2021 11:39
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.

3 participants