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/Interfaces/IHomeServer.cs | 6 +++--- MatrixRoomUtils.Core/Interfaces/IStateEventType.cs | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 MatrixRoomUtils.Core/Interfaces/IStateEventType.cs (limited to 'MatrixRoomUtils.Core/Interfaces') diff --git a/MatrixRoomUtils.Core/Interfaces/IHomeServer.cs b/MatrixRoomUtils.Core/Interfaces/IHomeServer.cs index c5645e6..fcff0f2 100644 --- a/MatrixRoomUtils.Core/Interfaces/IHomeServer.cs +++ b/MatrixRoomUtils.Core/Interfaces/IHomeServer.cs @@ -1,7 +1,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.Interfaces; @@ -91,7 +91,7 @@ public class IHomeServer { } _profileCache.Add(mxid, null); - var resp = await _httpClient.GetAsync($"/_matrix/client/r0/profile/{mxid}"); + var resp = await _httpClient.GetAsync($"/_matrix/client/v3/profile/{mxid}"); var data = await resp.Content.ReadFromJsonAsync(); if (!resp.IsSuccessStatusCode) Console.WriteLine("Profile: " + data); var profile = data.Deserialize(); @@ -99,5 +99,5 @@ public class IHomeServer { return profile; } - public string? ResolveMediaUri(string mxc) => mxc.Replace("mxc://", $"{FullHomeServerDomain}/_matrix/media/r0/download/"); + public string? ResolveMediaUri(string mxc) => mxc.Replace("mxc://", $"{FullHomeServerDomain}/_matrix/media/v3/download/"); } \ No newline at end of file diff --git a/MatrixRoomUtils.Core/Interfaces/IStateEventType.cs b/MatrixRoomUtils.Core/Interfaces/IStateEventType.cs new file mode 100644 index 0000000..053f50c --- /dev/null +++ b/MatrixRoomUtils.Core/Interfaces/IStateEventType.cs @@ -0,0 +1,5 @@ +namespace MatrixRoomUtils.Core.Interfaces; + +public interface IStateEventType { + +} \ No newline at end of file -- cgit 1.5.1