-
Notifications
You must be signed in to change notification settings - Fork 172
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
Store user info in liveblocks room #4516
Conversation
Job #9233: Bundle Size — 65.58MiB (~+0.01%).
Warning Bundle contains 67 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
View job #9233 report View feature/store-name-avatar branch activity |
@@ -305,7 +289,7 @@ const FollowingOverlay = React.memo(() => { | |||
} | |||
}) | |||
|
|||
if (followed == null) { | |||
if (followed == null || followedUser == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if followed != null
and followedUser == null
it would be worth writing something to the console because it should not happen
Problem:
resolveUsers
function tocreateRoomContext
Presence
stores user related persistent information (name, avatar and colorIndex), even though the role of that should be to only show the transient state to of presence.Fix:
Theoretically, we should provide an endpoint which can be used get user information from our backend. However, as a quick solution I decided to store the name/avatar/colorIndex in the Liveblocks room storage.
I deleted all redundant information from liveblocks:
The extra upside of this is that in a single project your color remains the same across presence sessions.