Skip to content

feat(logout): handle session expiration (AR-1556)#777

Merged
mchenani merged 51 commits intodevelopfrom
feat/AR-1656_handle_session_expiration
Aug 1, 2022
Merged

feat(logout): handle session expiration (AR-1556)#777
mchenani merged 51 commits intodevelopfrom
feat/AR-1656_handle_session_expiration

Conversation

@mchenani
Copy link
Copy Markdown
Contributor

@mchenani mchenani commented Jul 19, 2022

StoryAR-1556 Admin deletes a group conversation for everyone in the group


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

This PR cover 3 topics around user session:

  • Handle remove client event: when a user delete one of their clients on other client, all other clients will receive client_removed event with the clientId.
  • Handle user account deletion: when a user delete its account from other clients, all other clients will receive user_delete event.
    In both above events + the selfLogout we need to send the reason of the logout to the AR app! So I had to refactor the AuthSession to support that idea.

Issues

  • Handle user account deletion
  • Handle client remove
  • Send the logout/session expiration reason to the AR

Causes (Optional)

The events weren't handled before.

Solutions

Handle the events in the userEventsReceiver and refactor the AuthSession

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:
Needs to release Kalium related PR as well.
wireapp/kalium#661

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

WIP

  • I have added automated test to this contribution

How to Test

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 1 failed.

…oaded into feat/AR-1656_handle_session_expiration

� Conflicts:
�	app/src/main/kotlin/com/wire/android/ui/WireActivityViewModel.kt
�	kalium
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 19, 2022

Unit Test Results

  29 files  ±0    29 suites  ±0   26s ⏱️ -3s
179 tests ±0  179 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit dd96aab. ± Comparison against base commit a05483c.

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 2 failed.

…oaded into feat/AR-1656_handle_session_expiration

� Conflicts:
�	app/src/main/res/values/strings.xml
�	kalium
@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 3 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 4 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 10 failed.

…oaded into feat/AR-1656_handle_session_expiration

� Conflicts:
�	.github/workflows/check-kalium-commitish.yml
�	kalium
@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 11 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 12 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 13 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 14 failed.

Copy link
Copy Markdown
Member

@MohamadJaara MohamadJaara left a comment

Choose a reason for hiding this comment

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

🍇 work 🚀, only small changes needed to remove unnecessary assisted injection

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 16 failed.

@AndroidBob
Copy link
Copy Markdown
Collaborator

Build 17 succeeded.

The build produced the following APK's:

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 1, 2022

Codecov Report

Merging #777 (dd96aab) into develop (a05483c) will increase coverage by 0.04%.
The diff coverage is 32.18%.

@@              Coverage Diff              @@
##             develop     #777      +/-   ##
=============================================
+ Coverage      15.29%   15.34%   +0.04%     
+ Complexity       372      365       -7     
=============================================
  Files            241      240       -1     
  Lines          11033    11050      +17     
  Branches        1792     1801       +9     
=============================================
+ Hits            1688     1696       +8     
- Misses          9186     9192       +6     
- Partials         159      162       +3     
Impacted Files Coverage Δ
...adcastreceivers/CallNotificationDismissReceiver.kt 0.00% <0.00%> (ø)
...rs/ConnectionRequestNotificationDismissReceiver.kt 0.00% <0.00%> (ø)
...astreceivers/MessageNotificationDismissReceiver.kt 0.00% <0.00%> (ø)
...astreceivers/SummaryNotificationDismissReceiver.kt 0.00% <0.00%> (ø)
...ire/android/ui/authentication/login/LoginScreen.kt 0.00% <0.00%> (ø)
.../ui/authentication/login/email/LoginEmailScreen.kt 0.00% <0.00%> (ø)
...roid/ui/authentication/login/sso/LoginSSOScreen.kt 0.00% <0.00%> (ø)
...android/ui/authentication/welcome/WelcomeScreen.kt 0.00% <ø> (ø)
...id/ui/userprofile/self/SelfUserProfileViewModel.kt 0.00% <ø> (ø)
.../android/util/lifecycle/ConnectionPolicyManager.kt 0.00% <0.00%> (ø)
... and 12 more

@mchenani mchenani merged commit 8282587 into develop Aug 1, 2022
@mchenani mchenani deleted the feat/AR-1656_handle_session_expiration branch August 1, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants