liquid_feedback_frontend

annotate app/main/member/_action/update_notify_level.lua @ 1268:134c9bbbc4ab

Fixes on notification system
author bsw
date Sun Apr 17 17:16:51 2016 +0200 (2016-04-17)
parents 1ee50ceb5087
children 5f20831f0ab6
rev   line source
bsw@1255 1 local disable_notifications = param.get("disable_notifications") == "true" and true or false
bsw@1255 2
bsw@1255 3 if app.session.member.disable_notifications ~= disable_notifications then
bsw@1255 4 IgnoredArea:destroy_by_member_id(app.session.member_id)
bsw@1255 5 app.session.member.disable_notifications = disable_notifications
bsw@1255 6 end
bsw@1255 7
bsw@1268 8 if param.get("digest") == "true" then
bsw@1255 9 local dow = param.get("digest_dow")
bsw@1255 10 if dow == "daily" then
bsw@1265 11 app.session.member.notification_dow = nil
bsw@1255 12 else
bsw@1265 13 app.session.member.notification_dow = tonumber(dow)
bsw@1255 14 end
bsw@1265 15 app.session.member.notification_hour = param.get("digest_hour", atom.number)
bsw@1255 16 else
bsw@1265 17 app.session.member.notification_dow = nil
bsw@1265 18 app.session.member.notification_hour = nil
bsw@1255 19 end
bsw@1255 20
bsw@348 21 app.session.member:save()

Impressum / About Us