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 role change stream event #1157

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Fix role change stream event #1157

merged 2 commits into from
Mar 7, 2024

Conversation

Aman035
Copy link
Member

@Aman035 Aman035 commented Mar 7, 2024

Fixes Issue

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

@Aman035 Aman035 changed the base branch from main to alpha March 7, 2024 07:15
Copy link

github-actions bot commented Mar 7, 2024

In 'DataModifier.ts' file:

  1. Line 90: Missing closing brace '}' after the if block in the mapToRequestEvent method.
  2. Line 102: Missing closing brace '}' after the event property in mapToRemoveEvent method.
  3. Line 114: Missing closing brace '}' after the event property in mapToRoleChangeEvent method.
  4. Line 140: Misplaced 'return { meta };' statement inside the buildChatGroupEventMetaAndRaw method.
  5. Line 148: Misplaced 'const raw: GroupEventRawData =' declaration inside the buildChatGroupEventMetaAndRaw method.
  6. Line 174: Incorrect assignment of raw in the handleToField method, missing equality operator.

In 'PushStream.ts' file:

  1. Line 81: Typo, should be 'constructor' instead of 'constructor ('.
  2. Line 94: Incorrect usage of return statement in shouldEmit method.
  3. Line 98: Missing closing brace '}' after the return statement in shouldEmit method.
  4. Line 101: Incorrect usage of return statement in the shouldEmit method.
  5. Line 129: Missing closing brace '}' after the else block in the CHAT_GROUPS event handling.
  6. Line 147: Missing closing brace '}' after the error logging in the CHAT_GROUPS event handling.
  7. Line 184: Incorrect comparison in the CHAT_RECEIVED_MESSAGE event handling.
  8. Line 210: Misplaced 'if' block in the SPACES event handling.
  9. Line 226: Incorrect comparison in the SPACES event handling.
  10. Line 243: Incorrect usage of emit for SPACE_OPS in the SPACES event handling.

In 'pushStreamTypes.ts' file:
No issues found.

In 'group.events.test.ts' file:
File not reviewed as it is not specified in the provided list.

Please address the identified issues.

Copy link

github-actions bot commented Mar 7, 2024

In DataModifier.ts:

  1. In the mapToRequestEvent method, there is a missing closing curly brace } after the if (includeRaw) { statement.
  2. The mapToRemoveEvent method is missing the implementation logic.
  3. In the mapToRoleChangeEvent method, the assignment for the event property is missing.
  4. The buildChatGroupEventMetaAndRaw method is missing the closing curly brace for the first meta object assignment.
  5. In the convertToProposedName method, the throw new Error() statement should be inside the default case, not after RoleChange case.
  6. In the convertToProposedNameForSpace method, the logic to return specific ProposedEventNames is missing.
  7. In the handleToField method, there is a missing closing curly brace for the if block in the should handleToField method.

In PushStream.ts:

  1. The shouldEmit method logic is incorrect. The return statement should be outside the if-else block.
  2. The this.pushChatSocket.on(EVENTS.DISCONNECT, async () => { is missing the closing curly brace } after the await handleSocketDisconnection('chat'); statement.
  3. The this.pushChatSocket.on(EVENTS.CHAT_GROUPS, (data: any) => { is missing the closing curly brace } after the catch block.

Please make the necessary corrections to address these issues.

@Aman035 Aman035 linked an issue Mar 7, 2024 that may be closed by this pull request
@Aman035 Aman035 merged commit 71c5b0d into alpha Mar 7, 2024
1 check passed
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.

🐛 [BUG] - ModifyRole stream event not working
2 participants