Skip to content

in 'cli-chat' example cli-chat.controller-behaviors.chat/update-user! function assigns 'loggable-user' in the 'channels' atom under the ':user' key so 'loggable-user' doesn't replace 'guest' in the channel. #247

Open
@enesj

Description

@enesj

When we call /me endpoint the response looks like this:

{:session-id #uuid "3dec53a7-0518-4912-b92a-7c5da257f5d4", :users/role :guest, :users/id #uuid "7701c8b3-2fe5-48ba-b428-954e59871544", :users/name "guest_OHAA", 
:user {:users/id 1, :users/name "enes", :users/role "member"}}

My suggestion is to change the (swap! channels update ch assoc :user loggable-user) in 'update-user!' to this:
(swap! channels update ch merge loggable-user) to resolve this problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions