public MatrixLoginResponse ClientLogin(MatrixLogin login) { MatrixRequestError error = mbackend.Post("/_matrix/client/r0/login", false, JObject.FromObject(login), out var result); if (error.IsOk) { return(result.ToObject <MatrixLoginResponse> ()); } throw new MatrixException(error.ToString()); //TODO: Need a better exception }
public void ClientLogin(MatrixLogin login) { JObject result; MatrixRequestError error = mbackend.Post("/_matrix/client/r0/login", false, JObject.FromObject(login), out result); if (error.IsOk) { current_login = result.ToObject <MatrixLoginResponse> (); SetLogin(current_login); } else { throw new MatrixException(error.ToString()); //TODO: Need a better exception } }