From 6554fc3cb0f566cabe9b9c0b9c661a34f4363cce Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 4 Jan 2017 11:46:23 +0100 Subject: [PATCH] Added protection against null notify recipient --- Backend/CommsTransmitter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Backend/CommsTransmitter.cs b/Backend/CommsTransmitter.cs index 1c52e8b4..4a93235f 100644 --- a/Backend/CommsTransmitter.cs +++ b/Backend/CommsTransmitter.cs @@ -31,7 +31,7 @@ namespace Swarmops.Backend int recipientCount = comm.Recipients.Count; BotLog.Write(2, "CommsTx", "--resolved to " + recipientCount.ToString("N0") + " recipients"); - if (recipientCount > 1) + if (recipientCount > 1 && comm.SenderPersonId != 0) { // "Your message has been queued for delivery and the recipients have been resolved. // Your mail will be sent to, or be attempted to sent to, [RecipientCount] people in [Geography] in [OrganizationName]." @@ -90,7 +90,7 @@ namespace Swarmops.Backend OutboundComm reloadedComm = OutboundComm.FromIdentity(comm.Identity); // object doesn't update as we get results - if (comm.RecipientCount > 1) + if (comm.RecipientCount > 1 && comm.SenderPersonId != 0) { BotLog.Write(2, "CommsTx", "--notifying");