about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Core/Extensions')
-rw-r--r--MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs2
-rw-r--r--MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs2
-rw-r--r--MatrixRoomUtils.Core/Extensions/StringExtensions.cs22
3 files changed, 13 insertions, 13 deletions
diff --git a/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs b/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs
index 66a5133..8eb0226 100644
--- a/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs
+++ b/MatrixRoomUtils.Core/Extensions/HttpClientExtensions.cs
@@ -1,4 +1,4 @@
-namespace MatrixRoomUtils.Extensions;
+namespace MatrixRoomUtils.Core.Extensions;
 
 public static class HttpClientExtensions
 {
diff --git a/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs b/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
index cf798ce..aa1832d 100644
--- a/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
+++ b/MatrixRoomUtils.Core/Extensions/ObjectExtensions.cs
@@ -1,6 +1,6 @@
 using System.Text.Json;
 
-namespace MatrixRoomUtils.Extensions;
+namespace MatrixRoomUtils.Core.Extensions;
 
 public static class ObjectExtensions
 {
diff --git a/MatrixRoomUtils.Core/Extensions/StringExtensions.cs b/MatrixRoomUtils.Core/Extensions/StringExtensions.cs
index 27d8265..7bed7a3 100644
--- a/MatrixRoomUtils.Core/Extensions/StringExtensions.cs
+++ b/MatrixRoomUtils.Core/Extensions/StringExtensions.cs
@@ -1,17 +1,17 @@
-using MatrixRoomUtils.Authentication;
+using MatrixRoomUtils.Core.Authentication;
 
-namespace MatrixRoomUtils.Extensions;
+namespace MatrixRoomUtils.Core.Extensions;
 
 public static class StringExtensions
 {
-    public static async Task<string> GetMediaUrl(this string MxcUrl)
-    {
-        //MxcUrl: mxc://rory.gay/ocRVanZoUTCcifcVNwXgbtTg
-        //target: https://matrix.rory.gay/_matrix/media/v3/download/rory.gay/ocRVanZoUTCcifcVNwXgbtTg
-        
-        var server = MxcUrl.Split('/')[2];
-        var mediaId = MxcUrl.Split('/')[3];
-        return $"{await MatrixAuth.ResolveHomeserverFromWellKnown(server)}/_matrix/media/v3/download/{server}/{mediaId}";
-    }
+    // public static async Task<string> GetMediaUrl(this string MxcUrl)
+    // {
+    //     //MxcUrl: mxc://rory.gay/ocRVanZoUTCcifcVNwXgbtTg
+    //     //target: https://matrix.rory.gay/_matrix/media/v3/download/rory.gay/ocRVanZoUTCcifcVNwXgbtTg
+    //     
+    //     var server = MxcUrl.Split('/')[2];
+    //     var mediaId = MxcUrl.Split('/')[3];
+    //     return $"{(await new RemoteHomeServer(server).Configure()).FullHomeServerDomain}/_matrix/media/v3/download/{server}/{mediaId}";
+    // }
     
 }
\ No newline at end of file