CPSSD / feedlark

Simple and Sharp RSS Reader
http://feedlark.com
MIT License
5 stars 4 forks source link

Add email summary system #270

Closed m1cr0man closed 8 years ago

m1cr0man commented 8 years ago

Connects to #37

Allows user to opt into daily, weekly or monthly email summaries of what is on their G2G.

Due to technical security limitations, the email does not expose the like/dislike buttons.

This has been tested in production and is deemed stable. The code can be checked, and it can be run in development mode to the point of sending emails, but that's it.

devoxel commented 8 years ago
> feedlark@0.0.0 hint /vagrant/server
> jshint controllers/*.js middleware/*.js models/*.js public/javascript/*.js test/*.js || true

controllers/users.js: line 16, col 52, Missing semicolon.
controllers/users.js: line 363, col 26, Use '===' to compare with '0'.
controllers/users.js: line 368, col 70, Don't make functions within a loop.

Things to fix here

devoxel commented 8 years ago
vagrant@vagrant-ubuntu-trusty-64:/vagrant/server$ npm run hint

> feedlark@0.0.0 hint /vagrant/server
> jshint controllers/*.js middleware/*.js models/*.js public/javascript/*.js test/*.js || true

controllers/users.js: line 427, col 70, Don't make functions within a loop.

You're still making the function in the loop bae, just a tiny one now insead of a big one

streamModel.getFeedsNoTransaction(db, user.username, feeds => processSummaryData(user, feeds));

could be

streamModel.getFeedsNoTransaction(db, user.username, processSummaryData);

but you'd need to change how streamModel passes arguments


Apart from the issue noted above, it works grand. If you don't want to bother fixing the issue that's fine, it's not a huge one since the functions that will be generated in the interpreter aren't big. But it's up to you :+1:

m1cr0man commented 8 years ago

Yeah the change isn't that simple because I need to pass the user in too.

Due to how this is run, there will only be one or two loops per execution until we have maybe 500 users. Even then it won't grow very fast. Point being, it's not that bad to be creating this tiny function each time so I'm happy to close this.

Do so when you're ready.

PS Thanks for including the cmd this time, I didn't know how to lint