bsw@1485: local disable_notifications = param.get("enable_notifications") ~= "true" and true or false bsw@1255: bsw@1255: if app.session.member.disable_notifications ~= disable_notifications then bsw@1255: IgnoredArea:destroy_by_member_id(app.session.member_id) bsw@1255: app.session.member.disable_notifications = disable_notifications bsw@1255: end bsw@1255: bsw@1275: if app.session.member.disable_notifications then bsw@1265: app.session.member.notification_dow = nil bsw@1265: app.session.member.notification_hour = nil bsw@1485: bsw@1275: else bsw@1275: if param.get("digest") == "true" then bsw@1275: local dow = param.get("notification_dow") bsw@1275: if dow == "daily" then bsw@1275: app.session.member.notification_dow = nil bsw@1275: else bsw@1275: app.session.member.notification_dow = tonumber(dow) bsw@1275: end bsw@1275: app.session.member.notification_hour = tonumber(param.get("notification_hour")) bsw@1275: else bsw@1275: app.session.member.notification_dow = nil bsw@1275: app.session.member.notification_hour = nil bsw@1275: end bsw@1255: end bsw@1255: bsw@348: app.session.member:save()