Skip to content

Commit 229c56d

Browse files
committed
fixed find problem on ios 18. It searched for a message without a folder id.
1 parent 05fe610 commit 229c56d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib/request/find.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,17 @@ public function Handle($commandCode) {
175175
if ($searchtotal > 0) {
176176
foreach ($rows as $u) {
177177
// fetch the SyncObject for this result
178-
$message = self::$backend->Fetch(false, $u['longid'], $cpo);
179-
$mfolderid = self::$deviceManager->GetFolderIdForBackendId(bin2hex($message->ParentSourceKey));
178+
list($longfolderid, $uid) = Utils::SplitMessageId($u['longid']);
179+
$folderid = self::$deviceManager->GetFolderIdForBackendId($u['folderid']);
180+
$message = self::$backend->Fetch($folderid, $uid, $cpo);
180181

181182
self::$encoder->startTag(SYNC_FIND_RESULT);
182183
self::$encoder->startTag(SYNC_FOLDERTYPE);
183184
self::$encoder->content($u['class']);
184185
self::$encoder->endTag();
185186

186187
self::$encoder->startTag(SYNC_SERVERENTRYID);
187-
self::$encoder->content($mfolderid . ":" . $u['serverid']);
188+
self::$encoder->content($folderid . ":" . $u['serverid']);
188189
self::$encoder->endTag();
189190
self::$encoder->startTag(SYNC_FOLDERID);
190191
self::$encoder->content($cpo->GetRawFindFolderId());

0 commit comments

Comments
 (0)