Skip to content

Commit

Permalink
Fixed the MMS email contents in support of #464.
Browse files Browse the repository at this point in the history
  • Loading branch information
uncheckederror committed Oct 13, 2024
1 parent 4eece0d commit 010208e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Messaging/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,18 +498,23 @@
mediaURLs.Add($"{spacesConfig.ServiceURL}{fileRequest.BucketName}/{fileRequest.Key}");
// For debugging in Ops
if (file.Contains(".txt"))
if (file.EndsWith(".txt"))
{
var contextText = await fileDownloadURL.GetStringAsync();
contents.Add(contextText);
// Open the text file using a stream reader.
using StreamReader reader = new(streamToFile);
// Read the stream as a string.
string text = await reader.ReadToEndAsync();
contents.Add(text);
}
}
}
// Put all of the text into the Content field.
foreach (var content in contents)
{
messageRecord.Content += $"<p>{toForward.Content}</p>";
messageRecord.Content += $"<p>{content}</p>";
}
}
Expand Down

0 comments on commit 010208e

Please sign in to comment.