Skip to content

Commit

Permalink
fix(other): gmail messages not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
christer77 committed Jan 28, 2025
1 parent 5900008 commit f47a2ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,10 @@ public function process() {
if (array_key_exists('imap_server_id', $this->request->post)) {
$active[] = $this->request->post['imap_server_id'];
}
if (count($active)===0) {
$data_sources = imap_data_sources();
$active = array_map(function($ds) { return $ds['id']; }, $data_sources);
}
$updated = 0;
foreach ($active as $server_id) {
$server = Hm_IMAP_List::dump($server_id, true);
Expand Down
4 changes: 2 additions & 2 deletions modules/imap/hm-imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ public function get_message_list($uids, $raw=false, $include_content_body = fals
}
$command .= "BODY.PEEK[HEADER.FIELDS (SUBJECT X-AUTO-BCC FROM DATE CONTENT-TYPE X-PRIORITY TO LIST-ARCHIVE REFERENCES MESSAGE-ID X-SNOOZED)]";
if ($include_content_body) {
$command .= " BODY.PEEK[0.1]";
$command .= " BODY.PEEK[1]";
}
$command .= ")\r\n";
$cache_command = $command.(string)$raw;
Expand Down Expand Up @@ -958,7 +958,7 @@ public function get_message_list($uids, $raw=false, $include_content_body = fals
}
}
}
elseif ($vals[$i] == 'BODY[0.1') {
elseif ($vals[$i] == 'BODY[1') {
$content = '';
$i++;
$i++;
Expand Down

0 comments on commit f47a2ff

Please sign in to comment.