Nextcloud don't search if string is less then 2 characters

https://github.com/the-djmaze/snappymail/issues/561#issuecomment-1284191823
This commit is contained in:
the-djmaze 2022-10-19 20:05:58 +02:00
parent a0b4517074
commit 7211869636

View file

@ -55,6 +55,9 @@ class Provider implements IProvider
public function search(IUser $user, ISearchQuery $query): SearchResult
{
$result = [];
if (1 < \strlen(\trim($query->getTerm()))) {
return SearchResult::complete($this->getName(), $result);
}
SnappyMailHelper::startApp();
$oActions = \RainLoop\Api::Actions();
// $oAccount = $oActions->getMainAccountFromToken(false); // Issue: when account switched, wrong email is shown