From 23802bc9d607303ade17db7b4fc8ee71d7c29b46 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 16 Oct 2015 07:41:42 +0200 Subject: [PATCH] Added notification of waiting payout --- Logic/Financial/Payouts.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Logic/Financial/Payouts.cs b/Logic/Financial/Payouts.cs index 402306e1..0a9ffe25 100644 --- a/Logic/Financial/Payouts.cs +++ b/Logic/Financial/Payouts.cs @@ -577,6 +577,23 @@ namespace Swarmops.Logic.Financial satoshiPersonLookup[recipientPersonId] += satoshis; } } + else if (payout.RecipientPerson != null && payout.RecipientPerson.BitcoinPayoutAddress.Length < 3 && payout.Account.Length < 4) + { + // There is a payout for this person, but they don't have a bitcoin payout address set. Send notification to this effect twice a day. + + if (utcNow.Minute != 0) + { + continue; + } + if (utcNow.Hour % 12 != 0) + { + continue; + } + + NotificationStrings primaryStrings = new NotificationStrings(); + primaryStrings[NotificationString.OrganizationName] = organization.Name; + OutboundComm.CreateNotification(organization, NotificationResource.BitcoinPayoutAddress_PleaseSet, primaryStrings, People.FromSingle(payout.RecipientPerson)); + } } if (bitcoinPayouts.Count == 0)