-
Notifications
You must be signed in to change notification settings - Fork 229
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
What about FOSCommentBundle:Thread subscription? #367
Comments
Maybe I can attach thread owner to Thread entity on thread created event and listen to new comments events. Then create mail to thread owner. But what if I want to other users to subscribe to this thread. Thread subscription suggests. |
Sorry, but I have no time and today my dirty hack solution is https://gist.github.com/krasun/5599548. |
@krasun instead of overwriting the method creating a thread to add the subscribers, you should use the event dispatched when saving the thread |
@stof, I agree. But subscribers I take from another entities like blog post authors, product publishers and so on. And when I use listener I can't to know to what entity thread belongs. That's why I create thread in controller and use code like this: $thread->addSubscriber($bookingRequest->getPlace()->getOwner()->getUser());
$thread->addSubscriber($bookingRequest->getPurchaser()->getUser()); I can attach entity to thread, but I use threads for different entities. |
See #296 for an example on how to use the event dispatcher with FOSCommentBundle. |
I try to ask this question on StackOverflow - http://stackoverflow.com/questions/16596778/what-is-the-best-way-to-notify-about-new-foscommentbundlecomment. But I think, here is more suitable place.
For example I have BlogPost that isn't assigned with Thread, and I listen on any new comment on this BlogPost entity. What is the best way to do this?
P.S. Thanks for your bundles!
The text was updated successfully, but these errors were encountered: