Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* SPDX-FileCopyrightText: 2015-2016 owncloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/

namespace OCA\Mail;

use JsonSerializable;
Expand Down
4 changes: 0 additions & 4 deletions lib/BackgroundJob/ContextChat/SubmitContentJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ protected function run($argument): void {
return;
}


$client = $this->clientFactory->getClient($account);
$items = [];

Expand All @@ -128,16 +127,13 @@ protected function run($argument): void {
continue;
}


// Skip encrypted messages
if ($imapMessage->isEncrypted()) {
continue;
}


$fullMessage = $imapMessage->getFullMessage($imapMessage->getUid(), true);


$items[] = new ContentItem(
"{$mailbox->getId()}:{$message->getId()}",
$this->contextChatProvider->getId(),
Expand Down
1 change: 0 additions & 1 deletion lib/BackgroundJob/MigrateImportantJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use OCA\Mail\Account;
use OCA\Mail\Db\MailAccountMapper;
use OCA\Mail\Db\MailboxMapper;

use OCA\Mail\Exception\ServiceException;
use OCA\Mail\IMAP\IMAPClientFactory;
use OCA\Mail\Migration\MigrateImportantFromImapAndDb;
Expand Down
1 change: 0 additions & 1 deletion lib/Command/UpdateAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ final class UpdateAccount extends Command {
public const ARGUMENT_SMTP_USER = 'smtp-user';
public const ARGUMENT_SMTP_PASSWORD = 'smtp-password';


/** @var mapper */
private $mapper;

Expand Down
1 change: 0 additions & 1 deletion lib/Controller/ContactIntegrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
class ContactIntegrationController extends Controller {
private ICache $cache;


public function __construct(
string $appName,
IRequest $request,
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/DraftsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
class DraftsController extends Controller {
private ITimeFactory $timeFactory;


public function __construct(
string $appName,
private string $userId,
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/FilterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function __construct(
parent::__construct(Application::APP_ID, $request);
}


/**
* @psalm-return JSONResponse<200|404, array, array<never, never>>
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/Controller/MailboxesApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public function list(int $accountId): DataResponse {
return new DataResponse($mailboxes, Http::STATUS_OK);
}



/**
* List the newest messages in a mailbox of the user which is currently logged-in
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/MessageApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Controller;

use OCA\Mail\Contracts\IDkimService;
Expand Down Expand Up @@ -140,7 +141,6 @@ public function send(
return new DataResponse('Recipients cannot be empty.', Http::STATUS_BAD_REQUEST);
}


try {
$messageAttachments = $this->handleAttachments();
} catch (UploadException $e) {
Expand Down
2 changes: 0 additions & 2 deletions lib/Controller/MessagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ public function getHtmlBody(int $id, bool $plain = false): Response {
}
}


$htmlResponse = $plain
? HtmlResponse::plain($html)
: HtmlResponse::withResizer(
Expand Down Expand Up @@ -1016,7 +1015,6 @@ public function smartReply(int $messageId):JSONResponse {
return new JSONResponse([], Http::STATUS_NO_CONTENT);
}
return new JSONResponse($replies);

}

/**
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PreferencesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function update($key, $value): JSONResponse {
throw new ClientException('key or value missing');
}


$newValue = $this->userPreference->setPreference($this->userId, $key, $value);

return new JSONResponse([
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use OCP\IConfig;
use OCP\IRequest;
use Psr\Container\ContainerInterface;

use function array_merge;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
Expand Down
1 change: 0 additions & 1 deletion lib/Db/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function jsonSerialize() {
'accountId' => $this->getAccountId(),
'actionSteps' => $this->actionSteps,
'icon' => $this->icon,

];
}
}
1 change: 0 additions & 1 deletion lib/Db/ActionsMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ public function findAll(string $owner) {
return $this->findEntities($qb);
}


}
1 change: 0 additions & 1 deletion lib/Db/MailboxMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public function findByIds(array $ids): array {
return $this->findEntities($select);
}


/**
* @param int $id
* @param string $uid
Expand Down
2 changes: 0 additions & 2 deletions lib/Db/MessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ public function updateBulk(Account $account, bool $permflagsEnabled, Message ...
}
}


try {
// UPDATE messages SET flag true/false WHERE uid in (uids) -> for each flag
// => total of 20 queries
Expand Down Expand Up @@ -949,7 +948,6 @@ public function findIdsByQuery(Mailbox $mailbox, SearchQuery $query, string $sor
);
}


if ($query->getHasAttachments()) {
$select->andWhere(
$qb->expr()->eq('m.flag_attachments', $qb->createNamedParameter($query->getHasAttachments(), IQueryBuilder::PARAM_INT))
Expand Down
1 change: 0 additions & 1 deletion lib/Db/MessageTagsMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function getMessagesByTag(int $id): array {
->from($this->getTableName())
->where(
$qb->expr()->eq('tag_id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)),

);
return $this->findEntities($qb);
}
Expand Down
1 change: 0 additions & 1 deletion lib/Db/TextBlockShareMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@ public function deleteByTextBlockId(int $textBlockId): void {
);
}


}
1 change: 1 addition & 0 deletions lib/HordeTranslationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/

namespace OCA\Mail;

use Horde_Translation_Handler;
Expand Down
2 changes: 0 additions & 2 deletions lib/IMAP/ImapMessageFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function __construct(
) {
}


/**
* Configure the fetcher to fetch the body of the message.
*
Expand Down Expand Up @@ -170,7 +169,6 @@ public function fetchMessage(?Horde_Imap_Client_Data_Fetch $fetch = null): IMAPM
throw new DoesNotExistException("This email ($this->uid) can't be found. Probably it was deleted from the server recently. Please reload.");
}


$decryptionResult = $this->smimeService->decryptDataFetch($fullTextFetch, $this->userId);
$isSigned = $decryptionResult->isSigned();
$signatureIsValid = $decryptionResult->isSignatureValid();
Expand Down
1 change: 0 additions & 1 deletion lib/IMAP/MessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,6 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client,
return $this->converter->convert($structure);
};


$htmlBody = ($htmlBodyId !== null) ? $part->getBodyPart($htmlBodyId) : null;
if (!empty($htmlBody)) {
$htmlBody = $convertBody($htmlBodyId, $htmlBody);
Expand Down
1 change: 0 additions & 1 deletion lib/IMAP/PreviewEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public function process(Account $account, Mailbox $mailbox, array $messages, boo
return $messages;
}


try {
$data = $this->imapMapper->getBodyStructureData(
$client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use OCA\Mail\IMAP\Threading\ThreadBuilder;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;

use function array_chunk;
use function gc_collect_cycles;
use function iterator_to_array;
Expand Down
1 change: 0 additions & 1 deletion lib/Migration/MigrateImportantFromImapAndDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
class MigrateImportantFromImapAndDb {


public function __construct(
private MessageMapper $messageMapper,
private MailboxMapper $mailboxMapper,
Expand Down
1 change: 0 additions & 1 deletion lib/Migration/Version4000Date20240716172702.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
return $schema;
}


}
1 change: 0 additions & 1 deletion lib/Migration/Version4001Date20241009140707.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class Version4001Date20241009140707 extends SimpleMigrationStep {


/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
Expand Down
1 change: 0 additions & 1 deletion lib/Migration/Version5200Date20250728000000.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
return $schema;
}


}
1 change: 0 additions & 1 deletion lib/Model/IMAPMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ public function getSentDate(): Horde_Imap_Client_DateTime {
return $this->imapDate;
}


/**
* @param int $id
*
Expand Down
1 change: 0 additions & 1 deletion lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function getName(): string {
return $this->factory->get(Application::APP_ID)->t('Mail');
}


#[\Override]
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== Application::APP_ID) {
Expand Down
1 change: 1 addition & 0 deletions lib/PhishingDetectionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail;

use JsonSerializable;
Expand Down
1 change: 1 addition & 0 deletions lib/Provider/Command/MessageSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Provider\Command;

use OCA\Mail\Db\LocalAttachment;
Expand Down
1 change: 1 addition & 0 deletions lib/Provider/MailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Provider;

use OCA\Mail\Account;
Expand Down
2 changes: 1 addition & 1 deletion lib/Provider/MailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Provider;

use OCA\Mail\Provider\Command\MessageSend;
Expand All @@ -16,7 +17,6 @@
use OCP\Mail\Provider\IMessageSend;
use OCP\Mail\Provider\IService;
use OCP\Mail\Provider\Message;

use Psr\Container\ContainerInterface;

class MailService implements IService, IMessageSend {
Expand Down
1 change: 1 addition & 0 deletions lib/Send/AHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client_Socket;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/AntiAbuseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client_Socket;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/Chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use OCA\Mail\Account;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/CopySentMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client_Exception;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/FlagRepliedMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/SendHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client_Socket;
Expand Down
1 change: 1 addition & 0 deletions lib/Send/SentMailboxHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Mail\Send;

use Horde_Imap_Client_Socket;
Expand Down
1 change: 0 additions & 1 deletion lib/Service/AccountService.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public function getAllAcounts(): array {
return $this->mapper->getAllAccounts();
}


/**
* @param string $currentUserId
* @param int $accountId
Expand Down
2 changes: 0 additions & 2 deletions lib/Service/AiIntegrations/AiIntegrationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use OCP\TextProcessing\SummaryTaskType;
use OCP\TextProcessing\Task as TextProcessingTask;
use Psr\Log\LoggerInterface;

use function array_map;
use function implode;
use function in_array;
Expand Down Expand Up @@ -447,5 +446,4 @@ private function isPersonalEmail(IMAPMessage $imapMessage): bool {
return true;
}


}
Loading
Loading