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

Add Stream Name field in room info command #3439

Merged
merged 4 commits into from
Jul 12, 2021

Conversation

SelimEmre
Copy link
Contributor

@SelimEmre SelimEmre commented Jul 10, 2021

Copy link
Contributor

@mekya mekya left a comment

Choose a reason for hiding this comment

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

There are some parts needs to be changed. I'll make some quick commits for that. Please take a look at the new commits and if you think it does not make sense, we can discuss.

JSONObject jsonResponse = new JSONObject();
JSONArray jsonStreamIdArray = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

There is code duplication

jsonResponse.put(WebSocketConstants.COMMAND, WebSocketConstants.NOTIFICATION_COMMAND);
jsonResponse.put(WebSocketConstants.DEFINITION, WebSocketConstants.JOINED_THE_ROOM);
jsonResponse.put(WebSocketConstants.STREAM_ID, newStreamId);
jsonResponse.put(WebSocketConstants.STREAMS_IN_ROOM, jsonStreamArray);
jsonResponse.put(WebSocketConstants.STREAMS_IN_ROOM, jsonStreamIdArray);
jsonResponse.put(WebSocketConstants.STREAM_NAMES_IN_ROOM, jsonStreamNameArray);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's good idea to have two separate arrays having related information. It creates an overload in parsing.

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

89.4% 89.4% Coverage
0.0% 0.0% Duplication

@mekya mekya merged commit 9bc0e4c into master Jul 12, 2021
@mekya mekya deleted the feature/add-stream-name-field-in-room-info branch July 12, 2021 10:14
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.

None yet

2 participants