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@1264: if param.get("digest", atom.boolean) then bsw@1255: local dow = param.get("digest_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@1265: app.session.member.notification_hour = param.get("digest_hour", atom.number) 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()