No need to respond APP_VERSION in FolderInformation and FolderInformationMultiply requests

This commit is contained in:
djmaze 2021-10-31 01:06:32 +02:00
parent e4149b655c
commit 06cb57bc93
3 changed files with 5 additions and 9 deletions

View file

@ -551,9 +551,9 @@ class AppUser extends AbstractApp {
const folders = FolderUserStore.getNextFolderNames(refreshFolders);
if (arrayLength(folders)) {
Remote.folderInformationMultiply((iError, oData) => {
if (!iError && arrayLength(oData.Result.List)) {
if (!iError && arrayLength(oData.Result)) {
const utc = Date.now();
oData.Result.List.forEach(item => {
oData.Result.forEach(item => {
const hash = getFolderHash(item.Folder),
folder = getFolderFromCacheList(item.Folder);

View file

@ -386,8 +386,6 @@ trait Folders
throw new ClientException(Notifications::MailServerError, $oException);
}
$aInboxInformation['Version'] = APP_VERSION;
return $this->DefaultResponse(__FUNCTION__, $aInboxInformation);
}
@ -396,10 +394,7 @@ trait Folders
*/
public function DoFolderInformationMultiply() : array
{
$aResult = array(
'List' => array(),
'Version' => APP_VERSION
);
$aResult = array();
$aFolders = $this->GetActionParam('Folders', null);
if (\is_array($aFolders))
@ -416,7 +411,7 @@ trait Folders
$aInboxInformation = $this->MailClient()->FolderInformation($sFolder);
if (isset($aInboxInformation['Folder']))
{
$aResult['List'][] = [
$aResult[] = [
'Folder' => $aInboxInformation['Folder'],
'Hash' => $aInboxInformation['Hash'],
'MessageCount' => $aInboxInformation['MessageCount'],

View file

@ -100,6 +100,7 @@ trait Response
$sActionName = \preg_replace('/[^a-zA-Z0-9_]+/', '', $sActionName);
$aResult = array(
// 'Version' => APP_VERSION,
'Action' => $sActionName,
'Result' => $this->responseObject($mResult, $sActionName)
);