Extending "Following for Notifications"
- April 6, 2017
- 8 replies
- 4408 views
Hello All,
I am trying to extend OOTB notifications. I see that on click of "Notifications" under "Following" as shown in image, the call "http://localhost:6503/content/usergenerated/asi/mongo/content/we-retail/community/en/blog/jcr:content/content/primary/blog/0ipc-if_there_isoneques/subscriptions.social.json" is made. I see the social operation as "social:updatesubscriptions". In my custom blog post that uses OOTB comments component (extended) I do not have the click on the notifications. Rather I am looking to subscribe the user to notifications once the user adds first comment.
I am looking to know how I can trigger "social:updatesubscriptions" operation when a comment is made. Does anyone has any idea regarding this?
- While adding a comment in the beforeAction, I am adding this entry as below to add a relationship
{
"_id" : "377619aad2e22b3aee28404ebbc9778c9dd472a0",
"type_s" : "notification",
"endid_s" : "/content/usergenerated/asi/mongo/content/path/blog/a-post",
"rel_type_s" : "RESOURCE",
"parent_id_s" : "/content/usergenerated/asi/mongo/content/sites/social/relationships",
"provider_id" : "/content/usergenerated/asi/mongo/content/sites/social/relationships/e499d8b9-7161-4049-9781-2ca46afe413d",
"report_suite" : "mongo",
"id" : "/content/usergenerated/asi/mongo/content/sites/social/relationships/e499d8b9-7161-4049-9781-2ca46afe413d",
"startid_s" : "testuser",
"timestamp" : NumberLong("1491498857673")
}
- Also, created following path structure as it does OOTB /home/users/N/NsQmT0vSkB8YD4yom_lE/social/relationships/notification
Any other actions I might be missing?
Note: Using AEM 6.2 SP1, FP2
