vmail 1.9.9 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,11 +45,15 @@ module Vmail
45
45
  def reply_cc
46
46
  return nil unless (@replyall || @always_cc)
47
47
  xs = if @replyall
48
- ((current_mail['cc'] && current_mail['cc'].decoded) || "") .split(/,\s*/)
48
+ ((current_mail['cc'] && current_mail['cc'].decoded) || "") .split(/,\s*/) + ((current_mail['to'] && current_mail['to'].decoded) || "") .split(/,\s*/)
49
49
  else
50
50
  []
51
51
  end
52
- if @always_cc && xs.none? {|x| x =~ %r{#{@always_cc}}}
52
+ xs = xs.select {|x|
53
+ email = (x[/<([^>]+)>/, 1] || x)
54
+ email !~ /#{reply_recipient}/ && email !~ /#{@always_cc}/
55
+ }
56
+ if @always_cc
53
57
  xs << @always_cc
54
58
  end
55
59
  xs.uniq.select {|x| x != reply_recipient }.join(', ')
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '1.9.9'
2
+ VERSION = '2.0.0'
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.9.9
5
+ version: 2.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi