diff --git a/lib/Db/Message.php b/lib/Db/Message.php index 5e4791d1d1..229c26f395 100644 --- a/lib/Db/Message.php +++ b/lib/Db/Message.php @@ -326,7 +326,7 @@ static function (Tag $tag) { 'imipMessage' => $this->isImipMessage(), 'previewText' => $this->getPreviewText(), 'encrypted' => ($this->isEncrypted() === true), - 'mentionsMe'=> $this->getMentionsMe(), + 'mentionsMe' => $this->getMentionsMe(), ]; } } diff --git a/lib/Db/MessageMapper.php b/lib/Db/MessageMapper.php index 1bf5e681cf..35ba22e83c 100644 --- a/lib/Db/MessageMapper.php +++ b/lib/Db/MessageMapper.php @@ -957,7 +957,7 @@ public function findIdsByQuery(Mailbox $mailbox, SearchQuery $query, string $sor ); } - if($query->getMentionsMe()){ + if($query->getMentionsMe()) { $select->andWhere( $qb->expr()->eq('m.mentions_me', $qb->createNamedParameter($query->getMentionsMe(), IQueryBuilder::PARAM_BOOL)) ); diff --git a/lib/IMAP/MessageMapper.php b/lib/IMAP/MessageMapper.php index 2495d624dc..01f00b1ecf 100644 --- a/lib/IMAP/MessageMapper.php +++ b/lib/IMAP/MessageMapper.php @@ -52,7 +52,7 @@ class MessageMapper { public function __construct(LoggerInterface $logger, SmimeService $smimeService, - ImapMessageFetcherFactory $imapMessageFactory,) { + ImapMessageFetcherFactory $imapMessageFactory, ) { $this->logger = $logger; $this->smimeService = $smimeService; $this->imapMessageFactory = $imapMessageFactory; @@ -871,7 +871,7 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client, $structures = $client->fetch($mailbox, $structureQuery, [ 'ids' => new Horde_Imap_Client_Ids($uids), ]); - return array_map(function (Horde_Imap_Client_Data_Fetch $fetchData) use ($mailbox, $client,$emailAddress ) { + return array_map(function (Horde_Imap_Client_Data_Fetch $fetchData) use ($mailbox, $client, $emailAddress) { $hasAttachments = false; $text = ''; $isImipMessage = false; @@ -939,7 +939,7 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client, $structure->setContents($htmlBody); $htmlBody = $structure->getContents(); } - $mentionsUser = $this->checkLinks($htmlBody,$emailAddress); + $mentionsUser = $this->checkLinks($htmlBody, $emailAddress); $html = new Html2Text($htmlBody, ['do_links' => 'none','alt_image' => 'hide']); return new MessageStructureData( $hasAttachments, @@ -976,7 +976,7 @@ private function checkLinks(string $body, string $mailAddress) : bool { $anchors = $dom->getElementsByTagName('a'); foreach ($anchors as $anchor) { $href = $anchor->getAttribute('href'); - if($href === 'mailto:'.$mailAddress){ + if($href === 'mailto:'.$mailAddress) { return true; } } diff --git a/lib/Service/Search/FilterStringParser.php b/lib/Service/Search/FilterStringParser.php index 8007d4d227..b1a5041db9 100644 --- a/lib/Service/Search/FilterStringParser.php +++ b/lib/Service/Search/FilterStringParser.php @@ -107,7 +107,9 @@ private function parseFilterToken(SearchQuery $query, string $token): bool { $query->setMatch($param); return true; case 'mentions': - $query->setMentionsMe(true); + if($param === 'true') { + $query->setMentionsMe(true); + } return true; case 'flags': $flagArray = explode(',', $param); diff --git a/src/components/SearchMessages.vue b/src/components/SearchMessages.vue index a7066b72f5..aea61917de 100644 --- a/src/components/SearchMessages.vue +++ b/src/components/SearchMessages.vue @@ -253,10 +253,7 @@