Added protection against null notify recipient

This commit is contained in:
Rick Falkvinge
2017-01-04 11:46:23 +01:00
parent 22e76a9917
commit 6554fc3cb0
+2 -2
View File
@@ -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");