Getting a little defensive

This commit is contained in:
Rick Falkvinge
2017-01-04 13:09:46 +01:00
parent 100a281d9a
commit b6fc8f2ef7
@@ -106,9 +106,15 @@ namespace Swarmops.Logic.Communications.Payload
}
}
if (!subject.StartsWith("["))
{
// This is a little defensive programming as some subjects start with [Organization] and some don't - fix that here
subject = "[" + Strings[MailPayloadString.OrganizationName] + "] " + subject;
}
RenderedComm result = new RenderedComm();
result[CommRenderPart.BodyText] = body;
result[CommRenderPart.Subject] = "[" + Strings[MailPayloadString.OrganizationName] + "] " + subject;
result[CommRenderPart.Subject] = subject;
result[CommRenderPart.SenderMail] = "admin@swarmops.com"; // TODO: FIX FIX FIX HACK
result[CommRenderPart.SenderName] = "Swarmops Administrative";