The root store consists of the following structure:

  • user_repo: Users
  • chat_repo: Chats
  • message_repo: Messages

Actions

There are a few actions that exist on the root store.

NameArgumentsDescription
logininput: LoginInput

Logs the provided user into the chat server. If the user doesn’t yet exist, a new one is created. If the user does exist, the initially provided uid is used for authentication. The uid should be the unique and persisted identifier of the user within your user management solution.

logoutN/A

Logs the current user out of the chat server and resets the store.

loadN/AGets the current user’s details

Views

NameArgumentsDescription
userThe current logged in user
isLoggedInN/AReturns true if you are logged into the chat server