liquid_feedback_frontend

annotate app/main/member/_action/update_notify_level.lua @ 1532:3c15fea3f1c0

Added FirstLife group mirroring
author bsw
date Sun Oct 04 16:31:47 2020 +0200 (2020-10-04)
parents 2626155efb83
children
rev   line source
bsw@1485 1 local disable_notifications = param.get("enable_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@1275 8 if app.session.member.disable_notifications then
bsw@1265 9 app.session.member.notification_dow = nil
bsw@1265 10 app.session.member.notification_hour = nil
bsw@1485 11
bsw@1275 12 else
bsw@1275 13 if param.get("digest") == "true" then
bsw@1275 14 local dow = param.get("notification_dow")
bsw@1275 15 if dow == "daily" then
bsw@1275 16 app.session.member.notification_dow = nil
bsw@1275 17 else
bsw@1275 18 app.session.member.notification_dow = tonumber(dow)
bsw@1275 19 end
bsw@1275 20 app.session.member.notification_hour = tonumber(param.get("notification_hour"))
bsw@1275 21 else
bsw@1275 22 app.session.member.notification_dow = nil
bsw@1275 23 app.session.member.notification_hour = nil
bsw@1275 24 end
bsw@1255 25 end
bsw@1255 26
bsw@348 27 app.session.member:save()

Impressum / About Us