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

QnA: Add AfterAccepted event #321

Merged
merged 1 commit into from
Apr 28, 2016
Merged

QnA: Add AfterAccepted event #321

merged 1 commit into from
Apr 28, 2016

Conversation

DataTables
Copy link
Contributor

I'm currently working on a plug-in to integrate Vanilla with Algolia search and I'd like to include QnA accepted answers as a flag in Algolia to improve a comments ranking. For this I need to know when a comment is marked as accepted. This change adds a AfterAccepted event which passes the activity array as an event argument.

It might be possible to use the BeforeSave event from ActivityModel, but the ActivityModel has a check to make sure that users are notified of changes they make to their own data. that means the BeforeSave event doesn't get triggered bending on who marks the thread as accepted. This event resolves this.

I've signed the CLA should you wish to pull this in :-)

I'm currently working on a plug-in to integrate Vanilla with Algolia search and I'd like to include QnA accepted answers as a flag in Algolia to improve a comments ranking. For this I need to know when a comment is marked as accepted. This change adds a `AfterAccepted` event which passes the activity array as an event argument.

It might be possible to use the `BeforeSave` event from `ActivityModel`, but the `ActivityModel` has a check to make sure that users are notified of changes they make to their own data. that means the `BeforeSave` event doesn't get triggered bending on who marks the thread as accepted. This event resolves this.

I've signed the CLA should you wish to pull this in :-)
@linc
Copy link
Contributor

linc commented Apr 28, 2016

I dig it.

@linc linc merged commit 2c73443 into vanilla:master Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants