/// <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); } }
/// <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); }