about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Extensions/StringExtensions.cs
blob: 7bed7a348d3a0d9b06a62190cd5576799de5b763 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using MatrixRoomUtils.Core.Authentication;

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 new RemoteHomeServer(server).Configure()).FullHomeServerDomain}/_matrix/media/v3/download/{server}/{mediaId}";
    // }
    
}