Exemplo n.º 1
0
        /// <summary>
        /// Get information about this user from the server.
        /// </summary>
        /// <returns>A MatrixUser object</returns>
        /// <param name="userid">User ID</param>
        public MatrixUser GetUser()
        {
            MatrixProfile profile = api.ClientProfile(api.user_id);

            if (profile != null)
            {
                return(new MatrixUser(profile, api.user_id));
            }
            return(null);
        }
        private void CheckAndPerformRegistration(string user)
        {
            MatrixProfile profile = _api.ClientProfile("@" + user + ":" + Domain);

            if (profile == null)
            {
                _api.RegisterUserAsAS(user);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Get information about a user from the server.
        /// </summary>
        /// <returns>A MatrixUser object</returns>
        /// <param name="userid">User ID</param>
        public MatrixUser GetUser(string userid = null)
        {
            userid = userid == null ? api.user_id : userid;
            MatrixProfile profile = api.ClientProfile(userid);

            if (profile != null)
            {
                return(new MatrixUser(profile, userid));
            }
            return(null);
        }