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

feat: handle switching the active account #2613

Merged
merged 19 commits into from
Aug 22, 2023
Merged

Conversation

musale
Copy link
Contributor

@musale musale commented Jul 18, 2023

Closes #2113
Closes #2114

PR Type

  • Feature

Description of the changes

  • Displays different templates for different state statuses.
  • Add reconnect and closing of the connection methods.
  • Add a method to unsubscribe from all the notifications.
  • Add a new status 'no messages'.
  • Perform state updates when the user account is changed.
  • Add methods to handle connection closing or reconnection.
  • Add methods to clear current user messages and update the current username.
  • Change state update logic when there is no chat ID passed.
  • Update getting the current user values functions.
  • Update sample to handle no chatID passed.
  • Typings fixes.

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

- Display different messages for different states
- Fix typings

Signed-off-by: Martin Musale <[email protected]>
- Add reconnect and closing of the connection methods
- Add a method to unsubscribe from all the notifications

Signed-off-by: Martin Musale <[email protected]>
- Add a new status 'no messages'
- Perform state updates when the user account is changed
- Add methods to handle connection closing or reconnection
- Add methods to clear current user messages and update the current user name
- Change state update logic when there is no chat ID passed

Signed-off-by: Martin Musale <[email protected]>
Signed-off-by: Martin Musale <[email protected]>
@musale musale added this to the 2023-07 milestone Jul 18, 2023
@musale musale requested a review from a team as a code owner July 18, 2023 12:27
@microsoft-github-policy-service
Copy link
Contributor

Thank you for creating a Pull Request @musale.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@musale musale linked an issue Jul 18, 2023 that may be closed by this pull request
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback Issue needs response from issue author label Jul 18, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Author Feedback Issue needs response from issue author label Jul 24, 2023
@musale musale linked an issue Jul 25, 2023 that may be closed by this pull request
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Issue needs response from issue author and removed Needs: Author Feedback Issue needs response from issue author labels Jul 25, 2023
This is way simpler to enable removing all the subscriptions for a given chat. The alternative that
was using the connection.off method required precise handlers that were the same as the ones
passed during creation of the subscriptions.

Signed-off-by: Martin Musale <[email protected]>
@musale musale merged commit d73db51 into next/mgt-chat Aug 22, 2023
7 checks passed
@musale musale deleted the fix-account-switch branch August 22, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Handle chat not found Handle active account change
4 participants