mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
No need to respond APP_VERSION in FolderInformation and FolderInformationMultiply requests
This commit is contained in:
parent
e4149b655c
commit
06cb57bc93
3 changed files with 5 additions and 9 deletions
|
|
@ -551,9 +551,9 @@ class AppUser extends AbstractApp {
|
||||||
const folders = FolderUserStore.getNextFolderNames(refreshFolders);
|
const folders = FolderUserStore.getNextFolderNames(refreshFolders);
|
||||||
if (arrayLength(folders)) {
|
if (arrayLength(folders)) {
|
||||||
Remote.folderInformationMultiply((iError, oData) => {
|
Remote.folderInformationMultiply((iError, oData) => {
|
||||||
if (!iError && arrayLength(oData.Result.List)) {
|
if (!iError && arrayLength(oData.Result)) {
|
||||||
const utc = Date.now();
|
const utc = Date.now();
|
||||||
oData.Result.List.forEach(item => {
|
oData.Result.forEach(item => {
|
||||||
const hash = getFolderHash(item.Folder),
|
const hash = getFolderHash(item.Folder),
|
||||||
folder = getFolderFromCacheList(item.Folder);
|
folder = getFolderFromCacheList(item.Folder);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -386,8 +386,6 @@ trait Folders
|
||||||
throw new ClientException(Notifications::MailServerError, $oException);
|
throw new ClientException(Notifications::MailServerError, $oException);
|
||||||
}
|
}
|
||||||
|
|
||||||
$aInboxInformation['Version'] = APP_VERSION;
|
|
||||||
|
|
||||||
return $this->DefaultResponse(__FUNCTION__, $aInboxInformation);
|
return $this->DefaultResponse(__FUNCTION__, $aInboxInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -396,10 +394,7 @@ trait Folders
|
||||||
*/
|
*/
|
||||||
public function DoFolderInformationMultiply() : array
|
public function DoFolderInformationMultiply() : array
|
||||||
{
|
{
|
||||||
$aResult = array(
|
$aResult = array();
|
||||||
'List' => array(),
|
|
||||||
'Version' => APP_VERSION
|
|
||||||
);
|
|
||||||
|
|
||||||
$aFolders = $this->GetActionParam('Folders', null);
|
$aFolders = $this->GetActionParam('Folders', null);
|
||||||
if (\is_array($aFolders))
|
if (\is_array($aFolders))
|
||||||
|
|
@ -416,7 +411,7 @@ trait Folders
|
||||||
$aInboxInformation = $this->MailClient()->FolderInformation($sFolder);
|
$aInboxInformation = $this->MailClient()->FolderInformation($sFolder);
|
||||||
if (isset($aInboxInformation['Folder']))
|
if (isset($aInboxInformation['Folder']))
|
||||||
{
|
{
|
||||||
$aResult['List'][] = [
|
$aResult[] = [
|
||||||
'Folder' => $aInboxInformation['Folder'],
|
'Folder' => $aInboxInformation['Folder'],
|
||||||
'Hash' => $aInboxInformation['Hash'],
|
'Hash' => $aInboxInformation['Hash'],
|
||||||
'MessageCount' => $aInboxInformation['MessageCount'],
|
'MessageCount' => $aInboxInformation['MessageCount'],
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ trait Response
|
||||||
$sActionName = \preg_replace('/[^a-zA-Z0-9_]+/', '', $sActionName);
|
$sActionName = \preg_replace('/[^a-zA-Z0-9_]+/', '', $sActionName);
|
||||||
|
|
||||||
$aResult = array(
|
$aResult = array(
|
||||||
|
// 'Version' => APP_VERSION,
|
||||||
'Action' => $sActionName,
|
'Action' => $sActionName,
|
||||||
'Result' => $this->responseObject($mResult, $sActionName)
|
'Result' => $this->responseObject($mResult, $sActionName)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue