Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearchitect filters as event listeners #14

Open
kern opened this issue Jul 15, 2015 · 0 comments
Open

Rearchitect filters as event listeners #14

kern opened this issue Jul 15, 2015 · 0 comments
Assignees

Comments

@kern
Copy link
Owner

kern commented Jul 15, 2015

Currently, filters are callbacks which receive the full thread as an argument, but this isn't terribly smart since we have to diff against previous versions of the thread to see what's changed. This is especially problematic with edits because the Graph API doesn't give you any indication that a post's content has changed, and hence commands can be issued retroactively if you edit old comments.

I'm moving over to an evented model for representing changes to the group's feed on the sentiment branch. There will be a PostEmitter of some sort which emits new, edit, and delete events whenever a post or comment is created, edited, or deleted. Persistence will be baked in so that we can diff thread versions, probably through an embedded database like nedb.

@kern kern self-assigned this Jul 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant