Skip to content

Commit

Permalink
Fix reporting service (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fosol authored Oct 31, 2024
1 parent 4594c1c commit 6c47d0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions libs/net/ches/ChesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ public async Task<EmailResponseModel> SendEmailAsync(IEmail email)
/// </summary>
/// <param name="emailBody">email body as html markup - possibly containing base64 encoded images</param>
/// <returns>dictionary of the images as attachments and the 'key' to use to search and replace them in the markup</returns>
private Dictionary<string, AttachmentModel> GetImagesFromEmailBody(string emailBody)
private static Dictionary<string, AttachmentModel> GetImagesFromEmailBody(string emailBody)
{
Dictionary<string, AttachmentModel> imageDictionary = new Dictionary<string, AttachmentModel>();
var imageDictionary = new Dictionary<string, AttachmentModel>();

var inlineImageMatches = Base64InlineImageRegex.Matches(emailBody);
if (inlineImageMatches.Any())
{
foreach (Match m in inlineImageMatches)
foreach (var m in inlineImageMatches.Cast<Match>())
{
var imageMediaType = m.Groups[1].Value;
var base64Image = m.Groups[2].Value;
Expand All @@ -281,7 +281,8 @@ private Dictionary<string, AttachmentModel> GetImagesFromEmailBody(string emailB
Filename = Guid.NewGuid().ToString(),
Content = base64Image
};
imageDictionary.Add(m.Value, attachment);
if (!imageDictionary.ContainsKey(m.Value))
imageDictionary.Add(m.Value, attachment);
}
}
return imageDictionary;
Expand Down
2 changes: 1 addition & 1 deletion openshift/kustomize/tekton/base/triggers/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
workspaces:
- name: source
persistentVolumeClaim:
claimName: pipelines
claimName: repo
- name: conditions
volumeClaimTemplate:
spec:
Expand Down

0 comments on commit 6c47d0e

Please sign in to comment.