about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions/StringExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Core/Extensions/StringExtensions.cs')
-rw-r--r--MatrixRoomUtils.Core/Extensions/StringExtensions.cs22
1 files changed, 11 insertions, 11 deletions
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