-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ticket #284 - API: Integration reactions with jots.
- Loading branch information
Showing
6 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup Messenger Messenger | ||
* @ingroup UnaModules | ||
* | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* For API only. | ||
*/ | ||
class BxMessengerJotVoteReactions extends BxTemplVoteReactions | ||
{ | ||
protected $_sModule; | ||
protected $_oModule; | ||
|
||
public function __construct($sSystem, $iId, $iInit = 1) | ||
{ | ||
parent::__construct($sSystem, $iId, $iInit); | ||
|
||
$this->_sModule = 'bx_messenger'; | ||
$this->_oModule = BxDolModule::getInstance($this->_sModule); | ||
} | ||
|
||
protected function _isAllowedVoteByObject($aObject) | ||
{ | ||
$CNF = &$this->_oModule->_oConfig->CNF; | ||
|
||
$aLot = $this->_oModule->_oDb->getLotInfoById($aObject[$CNF['FIELD_MESSAGE_FK']]); | ||
if(empty($aLot) || !is_array($aLot)) | ||
return false; | ||
|
||
return bx_srv($this->_aSystem['module'], 'check_allowed_view_for_profile', [$aLot]) === CHECK_ACTION_RESULT_ALLOWED; | ||
} | ||
} | ||
|
||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters