liquid_feedback_frontend
view app/main/member/_action/update_notify_level.lua @ 1271:f7380592513a
Fixes on notification system
author | bsw |
---|---|
date | Sun Apr 17 17:21:42 2016 +0200 (2016-04-17) |
parents | 1c31636e1bba |
children | b04fa071ba05 |
line source
1 local disable_notifications = param.get("disable_notifications") == "true" and true or false
3 if app.session.member.disable_notifications ~= disable_notifications then
4 IgnoredArea:destroy_by_member_id(app.session.member_id)
5 app.session.member.disable_notifications = disable_notifications
6 end
8 if param.get("digest") == "true" then
9 local dow = param.get("notification_dow")
10 if dow == "daily" then
11 app.session.member.notification_dow = nil
12 else
13 app.session.member.notification_dow = tonumber(dow)
14 end
15 app.session.member.notification_hour = tonumber(param.get("notification_hour"))
16 else
17 app.session.member.notification_dow = nil
18 app.session.member.notification_hour = nil
19 end
21 app.session.member:save()