02. Current User - gappein/gappein-chat-sdk GitHub Wiki

Now to set the user in your application, we do store the User in the memory itself. To set the User we use,

Gappein.getInstance().setUser(
            currentUser,
            token = currentUser.token, onSuccess = {
               //Handle the Success
            }, onError = {
               //Handle the exception
            }
        )

and currentUser here is,

   val currentUser = User(
                token = userToken,
                profileImageUrl = userUrl,
                name = userName,
                createdAt = currentDate
            )

Get instance of Current User

To get the current user we can use,

   Gappein.getInstance.getUser()