-
Notifications
You must be signed in to change notification settings - Fork 225
Fix ChatClient.currentUserId
not removed instantly after calling logout()
#3766
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
Conversation
WalkthroughThe logout logic in Changes
Sequence Diagram(s)sequenceDiagram
participant Client as ChatClient
participant AuthRepo as authenticationRepository
participant DeviceRepo as deviceRepository
Client->>AuthRepo: logOutUser()
alt removeCurrentDevice == true
Client->>DeviceRepo: removeDevice()
DeviceRepo-->>Client: completion
end
Client->>Client: Stop tracking, disconnect, clear local data
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Public Interface🚀 No changes affecting the public interface. |
SDK Size
|
SDK Performance
|
|
🔗 Issue Links
https://linear.app/stream/issue/IOS-1056
🎯 Goal
Fixes
ChatClient.currentUserId
not removed instantly after callinglogout()
.🛠 Implementation
Initially, I removed the currentUser data, only after the removeDevice was called, since it was not possible to create the current user controller without the currentUserId. But actually, now I just realised that we can just create the controller, and right after erase the current user local data.
Now, ff a customer runs this code, it will be correct:
🧪 Manual Testing Notes
N/A. Covered by tests.
☑️ Contributor Checklist
docs-content
repoSummary by CodeRabbit
Bug Fixes
Tests