How to programmatically subscribe a user to a page discussion? #325
-
Hi, I've tried tracing the process of submitting a comment with the follow-up checkbox ticked to see what the subscribe mechanism is, but don't seem to be able to trap it anywhere. Is there a method to subscribe a user to a discussion? I'd like to subscribe the page author to the discussion by default so that they are notified when comments are posted on their page. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @enzedonline, it has no such capability. Comments are posted to objects, but the connection between the Comment model and the object receiving the comments is based on the ContentType, it is not enough to know whether the object receiving the comments has a user attribute. When adopting the comments app for your site you can resolve that. I think the quickest solution would be to connect the signal comment_was_posted to a function to notify your users. |
Beta Was this translation helpful? Give feedback.
Hi @enzedonline, it has no such capability. Comments are posted to objects, but the connection between the Comment model and the object receiving the comments is based on the ContentType, it is not enough to know whether the object receiving the comments has a user attribute. When adopting the comments app for your site you can resolve that. I think the quickest solution would be to connect the signal comment_was_posted to a function to notify your users.