Avatar

Level 2

Hi Rahul_Bhardwaj,

Thank you for your response.

Yes, We want to set the Post "Follow" options by default instead of manually selecting the options once the post is created.

In the "New Post" form there will be a Subscribe button same as Follow button (this will appear only during post creation). User can select one or more options in the Subscribe button. After the Post is created, the OOTB Follow button will display against the Post as per current functionality. But the options in OOTB Follow button in the Post should reflect the options selected by user in Subscribe button.

Implementation approach 1:

1. We have overridden the OOTB subscriptions component as "Subscribe" component in our apps folder.

2. Used the subscriptions.js logic in subscribe.js and have removed the ajax calls to 'social:updatesubscriptions' as we do not have the subscribedId parameter (post id) before the creation of post. (These ajax calls were manipulating the group 'Follow' button as both use the same subscribedId).

Issue: We are not sure how to capture the options selected by user in Subscription button and create relationship node to sync it with the Follow button that appears on the Post.

Implementation approach 2:

1. We have extended Forum component in our apps folder. Added the OOTB subscription.hbs display logic in forum.hbs 'New Post' form.

2. Customized ForumComponent (server side) to expose methods for 'states' and 'subscribed' parameters for use in forum.hbs and also use the same in custom ForumOperationExtension class afterAction() method to create relationship nodes for the Post.

Issue: This customized server side component is not called and we are not able to set the user options and hence unable to proceed further.

Looking forward for your valuable inputs.

-Asha G