bsw@1255: local disable_notifications = param.get("disable_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@1268: if param.get("digest") == "true" then bsw@1270: local dow = param.get("notification_dow") bsw@1255: if dow == "daily" then bsw@1265: app.session.member.notification_dow = nil bsw@1255: else bsw@1265: app.session.member.notification_dow = tonumber(dow) bsw@1255: end bsw@1270: app.session.member.notification_hour = tonumber(param.get("notification_hour")) bsw@1255: else bsw@1265: app.session.member.notification_dow = nil bsw@1265: app.session.member.notification_hour = nil bsw@1255: end bsw@1255: bsw@348: app.session.member:save()