Skip to content

Commit

Permalink
Fix extra slashes in Matrix attachment URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenmc committed Feb 19, 2024
1 parent 0455c4a commit 5601ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Theorem/ChatServices/MatrixChatServiceConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ private void processRoomMessage(string roomId, MatrixRoomMessageEvent message)
// Reconstruct download URL from MXC URI as per
// https://spec.matrix.org/v1.3/client-server-api/#get_matrixmediav3downloadservernamemediaidfilename
var mxcUrl = new Uri(imageContent.Url);
string attachmentUrl = $"{_serverBaseUrl}/_matrix/media/v3/download/" +
string attachmentUrl = $"{_serverBaseUrl}_matrix/media/v3/download/" +
$"{mxcUrl.Host}{mxcUrl.LocalPath}/file";

attachments.Add(new AttachmentModel()
Expand Down

0 comments on commit 5601ee6

Please sign in to comment.