iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower
Apache License 2.0
393 stars 82 forks source link

Fix filters for _db_updates feeds: pass doc, type, req to filter #61

Closed grimborg closed 9 years ago

grimborg commented 9 years ago

This fixes an issue where trying to use a filter function on a _db_updates feed fails with the error "Internal filter needs .doc".

The _db_updates feeds have db_name and type instead of doc, so I pass these to the filter function.

jcrugzz commented 9 years ago

@grimborg could you document this in the readme, add a test around this if these are the semantics that make sense? Otherwise this LGTM :+1:

grimborg commented 9 years ago

Thanks for your feedback! I've added a test and updated the docs.

I've noticed that some of the existing tests fail (even on master), but maybe it's my version of couch... The test that I added does pass, though.

grimborg commented 9 years ago

Hi, did you get a chance to review the changes? Thanks!

jcrugzz commented 9 years ago

@grimborg sorry for the delay. I will merge this