liquid_feedback_frontend

diff model/event.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 659e3eda2fad
line diff
     1.1 --- a/model/event.lua	Tue Apr 05 20:41:05 2016 +0200
     1.2 +++ b/model/event.lua	Sun Apr 17 15:03:44 2016 +0200
     1.3 @@ -137,14 +137,14 @@
     1.4  
     1.5  function Event:send_next_notification()
     1.6    
     1.7 -  local notification_sent = NotificationSent:new_selector()
     1.8 +  local notification_event_sent = NotificationEventSent:new_selector()
     1.9      :optional_object_mode()
    1.10      :for_update()
    1.11      :exec()
    1.12      
    1.13    local last_event_id = 0
    1.14 -  if notification_sent then
    1.15 -    last_event_id = notification_sent.event_id
    1.16 +  if notification_event_sent then
    1.17 +    last_event_id = notification_event_sent.event_id
    1.18    end
    1.19    
    1.20    local event = Event:new_selector()
    1.21 @@ -156,9 +156,9 @@
    1.22  
    1.23    if event then
    1.24      if last_event_id == 0 then
    1.25 -      db:query{ "INSERT INTO notification_sent (event_id) VALUES (?)", event.id }
    1.26 +      db:query{ "INSERT INTO notification_event_sent (event_id) VALUES (?)", event.id }
    1.27      else
    1.28 -      db:query{ "UPDATE notification_sent SET event_id = ?", event.id }
    1.29 +      db:query{ "UPDATE notification_event_sent SET event_id = ?", event.id }
    1.30      end
    1.31      
    1.32      event:send_notification()

Impressum / About Us