Permalink
Browse files

Fix #610: JomSocial integration doesn't support comments

  • Loading branch information...
mahagr committed Apr 27, 2012
1 parent 7b9cb7e commit 6ecd100baf375279edb147efddaf35ec9e1438d5
@@ -40,6 +40,12 @@ public function onAfterPost($message) {
$act->cid = $message->thread;
$act->access = $this->getAccess($message->getCategory());
+ // Comments and like support
+ $act->comment_id = $message->thread;
+ $act->comment_type = 'kunena.post';
+ $act->like_id = $message->thread;
+ $act->like_type = 'kunena.post';
+
// Do not add private activities
if ($act->access > 20) return;
CFactory::load ( 'libraries', 'activities' );
@@ -67,6 +73,12 @@ public function onAfterReply($message) {
$act->cid = $message->thread;
$act->access = $this->getAccess($message->getCategory());
+ // Comments and like support
+ $act->comment_id = $message->thread;
+ $act->comment_type = 'kunena.post';
+ $act->like_id = $message->thread;
+ $act->like_type = 'kunena.post';
+
// Do not add private activities
if ($act->access > 20) return;
CFactory::load ( 'libraries', 'activities' );
@@ -87,6 +99,12 @@ public function onAfterThankyou($thankyoutargetid, $username , $message) {
$act->cid = $thankyoutargetid;
$act->access = $this->getAccess($message->getCategory());
+ // Comments and like support
+ $act->comment_id = $thankyoutargetid;
+ $act->comment_type = 'kunena.thankyou';
+ $act->like_id = $thankyoutargetid;
+ $act->like_type = 'kunena.thankyou';
+
// Do not add private activities
if ($act->access > 20) return;
CFactory::load ( 'libraries', 'activities' );

0 comments on commit 6ecd100

Please sign in to comment.