has anyone been successful in making the notifications work? my database values seems to be correct however im still not getting any notification.
platform: jomsocial
BToth wrote:No, they don't appear to be working for me either. I think I read somewhere they're not yet opertaional (although I don't know where I read that...I could just be making it up) :lol:
Hopefully soon!
Jason wrote:You need to follow the instructions on http://www.arrowchat.com/install under step five, but it is not ready yet. We hope to have the instructions written today.
function sendReply($obj, $replyMsgId){
$db =& $this->getDBO();
$my =& JFactory::getUser();
// get original sender from obj
$originalMsg = new CMessage($db);
$originalMsg->load($replyMsgId);
$recepientMsg = $this->getRecepientMessage($replyMsgId);
$parentId = $originalMsg->parent;
$db->insertObject('#__community_msg', $obj, 'id');
// Update the parent
$obj->parent = $parentId;
$db->updateObject('#__community_msg', $obj, 'id');
if(is_array($recepientMsg)){
$recepientId = $this->getParticipantsID($replyMsgId, $my->id);
foreach($recepientId as $sToId){
$this->addReceipient($obj, $sToId);
/* ARROWCHAT NEW MESSAGE NOTIFICATION */
$query = "INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time)
VALUES ('".$sToId."', '".$obj->from."', '".$obj->from_name."', '1', '".time()."')";
$db->setQuery( $query );
$db->query();
/* END ARROWCHAT MESSAGE NOTIFICATION */
}
} else {
// add receipient, get the 'to' address from the original
// sender. BUT, in some case where user try to post two message in
// a row, the 'from' will failed. instead, we need to use 'to' from
// the original message.
$recepientId = $originalMsg->from;
if($my->id == $originalMsg->from){
$recepientId = $recepientMsg->to;
}
$this->addReceipient($obj, $recepientId);
/* ARROWCHAT NEW MESSAGE NOTIFICATION */
$query = "INSERT INTO arrowchat_notifications (to_id, author_id, author_name, type, alert_time)
VALUES ('".$recepientId."', '".$obj->from."', '".$obj->from_name."', '1', '".time()."')";
$db->setQuery( $query );
$db->query();
/* END ARROWCHAT MESSAGE NOTIFICATION */
}
return true;
}