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

refactored lines 46 to 70 to have helper functions and simplify the code, src/messaging/rooms.js #78

Open
wants to merge 2 commits into
base: f24
Choose a base branch
from

Conversation

safa-amin
Copy link

@safa-amin safa-amin commented Sep 3, 2024

This resolves issue #12

I refactored the 'modifyRoomData' function to be more efficient. In my new refactored code, the function essentially processes an array of room data objects, updating various fields based on certain conditions. The function goes through the integer fields, checks the room name (leaves), determines if the room is public and updates the notification settings if required.

I also added helper functions 'shouldUpdateNotificationSetting' and 'shouldUpdateGroups' to simplify the original code.

@coveralls
Copy link

coveralls commented Sep 3, 2024

Pull Request Test Coverage Report for Build 10718553140

Details

  • 14 of 16 (87.5%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 82.673%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/messaging/rooms.js 14 16 87.5%
Totals Coverage Status
Change from base Build 10550029021: 0.002%
Covered Lines: 22327
Relevant Lines: 25586

💛 - Coveralls

Copy link

sonarqubecloud bot commented Sep 5, 2024

@safa-amin safa-amin changed the title refactored lines 46 to 70 to have helper functions and simplify the code refactored lines 46 to 70 to have helper functions and simplify the code. resolves #12 Sep 5, 2024
@safa-amin safa-amin changed the title refactored lines 46 to 70 to have helper functions and simplify the code. resolves #12 refactored lines 46 to 70 to have helper functions and simplify the code, src/messaging/rooms.js Sep 5, 2024
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