vmail 1.7.3 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -212,11 +212,15 @@ module Vmail
212
212
  log "- update: new uids: #{new_ids.inspect}"
213
213
  if !new_ids.empty?
214
214
  self.max_seqno = new_ids[-1]
215
- res = get_message_headers(new_ids.reverse)
215
+ message_ids = fetch_and_cache_headers(new_ids)
216
+ res = get_message_headers(message_ids.reverse)
216
217
  res
217
218
  else
218
- ''
219
+ nil
219
220
  end
221
+ rescue
222
+ log $!
223
+ log $!.backtrace.join("\n")
220
224
  end
221
225
 
222
226
  # gets 100 messages prior to id
@@ -2,7 +2,13 @@ module Vmail
2
2
  module ShowingHeaders
3
3
 
4
4
  def get_message_headers(message_ids)
5
- messages = message_ids.map {|message_id| Message[message_id] }
5
+ messages = message_ids.map {|message_id|
6
+ m = Message[message_id]
7
+ if m.nil?
8
+ raise "Message #{message_id} not found"
9
+ end
10
+ m
11
+ }
6
12
  messages.map {|m| format_header_for_list(m)}.join("\n")
7
13
  end
8
14
 
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '1.7.3'
2
+ VERSION = '1.7.4'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.7.3
5
+ version: 1.7.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi