Edit private messages

This commit is contained in:
2021-09-13 22:13:31 +02:00
parent ea269a43a3
commit 69f111b149
3 changed files with 21 additions and 10 deletions

View File

@@ -2092,7 +2092,7 @@ class Databap extends PhpObject
$bSuccess = false;
$sDesc = '';
$asRefMsg = $this->oMySql->selectRow(self::MSG_TABLE, $iRefMsgId);
if($asRefMsg['type'] == self::MESSAGE_USER && $asRefMsg[$this->oMySql::getId(self::USER_TABLE)] == $this->getUserId()) {
if(($asRefMsg['type'] == self::MESSAGE_USER || $asRefMsg['type'] == self::MESSAGE_PRIVATE) && $asRefMsg[$this->oMySql::getId(self::USER_TABLE)] == $this->getUserId()) {
$bSuccess = $this->addMessage($sMessage, $asRefMsg['type'], $asRefMsg['id_channel'], $this->getUserId(), $iRefMsgId);
}
else $sDesc = 'Wrong user ID';
@@ -2320,9 +2320,9 @@ class Databap extends PhpObject
return $bExport?$this->getJsonPostResult($sSuccess, $sSuccess?'':'Aucune news', array('news'=>$asFormatNews)):$asFormatNews;
}
private function getConnectedChans($iuserId=0)
private function getConnectedChans($iUserId=0)
{
$iuserId = $iuserId>0?$iuserId:$this->getUserId();
$iUserId = $iUserId>0?$iUserId:$this->getUserId();
$sUserIdCol = MySqlManager::getId(self::USER_TABLE);
$asInfo = array('select' => array(MySqlManager::getId(self::CHAN_TABLE, true), MySqlManager::getText(self::CHAN_TABLE)),