liquid_feedback_frontend

diff app/main/_prefork/10_init.lua @ 1250:84f6e17c7ceb

Completed support for new notification system
author bsw
date Sun Apr 17 15:03:44 2016 +0200 (2016-04-17)
parents c0fd12b97d65
children 235a36a08da1
line diff
     1.1 --- a/app/main/_prefork/10_init.lua	Tue Apr 05 20:41:05 2016 +0200
     1.2 +++ b/app/main/_prefork/10_init.lua	Sun Apr 17 15:03:44 2016 +0200
     1.3 @@ -33,6 +33,10 @@
     1.4    config.mail_subject_prefix = "[LiquidFeedback] "
     1.5  end
     1.6  
     1.7 +if config.notification_digest_template == nil then
     1.8 +  config.notification_digest_template = "Hello #{name},\n\nthis is your personal digest.\n\n#{digest}\n"
     1.9 +end
    1.10 +
    1.11  if config.member_image_content_type == nil then
    1.12    config.member_image_content_type = "image/jpeg"
    1.13  end
    1.14 @@ -136,15 +140,17 @@
    1.15      delay = 5,
    1.16      handler = function()
    1.17        while true do
    1.18 -        local did_work = false
    1.19 -        local tmp
    1.20 -        tmp = Newsletter:send_next_newsletter()
    1.21 -        if tmp then did_work = true end
    1.22 -        tmp = Event:send_next_notification()
    1.23 -        if tmp then did_work = true end
    1.24 -        tmp = InitiativeForNotification:notify_next_member()
    1.25 -        if tmp then did_work = true end
    1.26 -        if not did_work then
    1.27 +        if not Newsletter:send_next_newsletter() then
    1.28 +          break
    1.29 +        end
    1.30 +      end
    1.31 +      while true do
    1.32 +        if not Event:send_next_notification() then
    1.33 +          break
    1.34 +        end
    1.35 +      end
    1.36 +      while true do
    1.37 +        if not InitiativeForNotification:notify_next_member() then
    1.38            break
    1.39          end
    1.40        end

Impressum / About Us