From f866946fbbe962c712049327ade9dcbd43900295 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 25 Jun 2023 03:07:05 +0200 Subject: Working state, refactored Rory&::LibMatrix --- MatrixRoomUtils.Core/Authentication/MatrixAuth.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MatrixRoomUtils.Core/Authentication') diff --git a/MatrixRoomUtils.Core/Authentication/MatrixAuth.cs b/MatrixRoomUtils.Core/Authentication/MatrixAuth.cs index 0f9eb58..83b279a 100644 --- a/MatrixRoomUtils.Core/Authentication/MatrixAuth.cs +++ b/MatrixRoomUtils.Core/Authentication/MatrixAuth.cs @@ -2,6 +2,7 @@ using System.Net.Http.Json; using System.Text.Json; using MatrixRoomUtils.Core.Extensions; using MatrixRoomUtils.Core.Responses; +using MatrixRoomUtils.Core.StateEventTypes; namespace MatrixRoomUtils.Core.Authentication; @@ -20,7 +21,7 @@ public class MatrixAuth { initial_device_display_name = "Rory&::MatrixRoomUtils" }; Console.WriteLine($"Sending login request to {homeserver}..."); - var resp = await hc.PostAsJsonAsync($"{homeserver}/_matrix/client/r0/login", payload); + var resp = await hc.PostAsJsonAsync($"{homeserver}/_matrix/client/v3/login", payload); Console.WriteLine($"Login: {resp.StatusCode}"); var data = await resp.Content.ReadFromJsonAsync(); if (!resp.IsSuccessStatusCode) Console.WriteLine("Login: " + data); -- cgit 1.5.1