Beispiel #1
0
 public function sendWink($userId, $partnerId)
 {
     if (empty($userId) || empty($partnerId)) {
         return FALSE;
     }
     if (($wink = $this->findByUserIdAndPartnerId($userId, $partnerId)) === NULL) {
         $wink = new WINKS_BOL_Winks();
     }
     $activeModes = json_decode(OW::getConfig()->getValue('mailbox', 'active_modes'));
     $wink->setUserId($userId);
     $wink->setPartnerId($partnerId);
     $wink->setTimeStamp(time());
     $wink->setStatus(WINKS_BOL_WinksDao::STATUS_WAIT);
     $wink->setViewed(0);
     $wink->setConversationId(0);
     $wink->setMessageType(in_array('chat', $activeModes) ? 'chat' : 'mail');
     $wink->setWinkback(0);
     $this->winksDao->save($wink);
     return TRUE;
 }
Beispiel #2
0
 public function sendWink($userId, $partnerId)
 {
     if (empty($userId) || empty($partnerId)) {
         return FALSE;
     }
     if (($wink = $this->findByUserIdAndPartnerId($userId, $partnerId)) === NULL) {
         $wink = new WINKS_BOL_Winks();
     }
     $wink->setUserId($userId);
     $wink->setPartnerId($partnerId);
     $wink->setTimeStamp(time());
     $wink->setStatus(WINKS_BOL_WinksDao::STATUS_WAIT);
     $wink->setViewed(0);
     $wink->setConversationId(0);
     $wink->setWinkback(0);
     $this->winksDao->save($wink);
     return TRUE;
 }