正在显示
2 个修改的文件
包含
11 行增加
和
9 行删除
@@ -337,6 +337,9 @@ class SyncMail { | @@ -337,6 +337,9 @@ class SyncMail { | ||
337 | } | 337 | } |
338 | 338 | ||
339 | $folder_id = $this->getFolderId($folder->getName()); | 339 | $folder_id = $this->getFolderId($folder->getName()); |
340 | + if($folder->getName() == 'INBOX'){ | ||
341 | + $this->folder_inbox_id = $folder_id; | ||
342 | + } | ||
340 | if(in_array($folder->getName(),['INBOX','[Gmail]/Important','[Gmail]/Starred','星标邮件','Important'])){ | 343 | if(in_array($folder->getName(),['INBOX','[Gmail]/Important','[Gmail]/Starred','星标邮件','Important'])){ |
341 | $isBody = true; | 344 | $isBody = true; |
342 | } | 345 | } |
@@ -456,18 +459,15 @@ class SyncMail { | @@ -456,18 +459,15 @@ class SyncMail { | ||
456 | 'folder_id' => $data['folder_id'], | 459 | 'folder_id' => $data['folder_id'], |
457 | 'uid' => $data['uid'] | 460 | 'uid' => $data['uid'] |
458 | ]),'`id`')); | 461 | ]),'`id`')); |
459 | - if(!$id){ | ||
460 | - $id = $this->db->value(listsSql::firstHot(dbWhere([ | ||
461 | - 'email_id'=> $data['email_id'], | ||
462 | - 'folder_id' => $data['folder_id'], | ||
463 | - 'uid' => $data['uid'] | ||
464 | - ]),'`id`')); | ||
465 | - } | ||
466 | - | ||
467 | 462 | ||
468 | if(!$id){ | 463 | if(!$id){ |
469 | 464 | ||
470 | $id = $this->insert($data); | 465 | $id = $this->insert($data); |
466 | + // 收件箱直接 未读 不远程为准 | ||
467 | + if(defined('CLI_AI_SYNC_START') && !empty($this->folder_inbox_id) && $this->folder_inbox_id == $data['folder_id']){ | ||
468 | + $data['seen'] = 0; | ||
469 | + } | ||
470 | + | ||
471 | if(!$id){ | 471 | if(!$id){ |
472 | continue; | 472 | continue; |
473 | } | 473 | } |
-
请 注册 或 登录 后发表评论