liquid_feedback_frontend
annotate app/main/member/_action/update_notify_level.lua @ 1256:0455f101565c
Fix syntax error
author | bsw |
---|---|
date | Sun Apr 17 16:48:07 2016 +0200 (2016-04-17) |
parents | 1d645a8d20fc |
children | 4afeb80741ad |
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@1255 | 8 if param.get("digest", atom.boolean) the |
bsw@1255 | 9 local dow = param.get("digest_dow") |
bsw@1255 | 10 if dow == "daily" then |
bsw@1255 | 11 app.session.member.digest_dow = nil |
bsw@1255 | 12 else |
bsw@1255 | 13 app.session.member.digest_dow = tonumber(dow) |
bsw@1255 | 14 end |
bsw@1255 | 15 app.session.member.digest_hour = param.get("digest_hour", atom.number) |
bsw@1255 | 16 else |
bsw@1255 | 17 app.session.member.digest_dow = nil |
bsw@1255 | 18 app.session.member.digest_hour = nil |
bsw@1255 | 19 end |
bsw@1255 | 20 |
bsw@348 | 21 app.session.member:save() |