Permalink
Browse files

Using Mailboxer 0.3.1 and fixing #6

  • Loading branch information...
1 parent 301d985 commit 7041b614c160119381e61609c819c8d3b0268adc @Roendal Roendal committed Jul 12, 2011
Showing with 18 additions and 1 deletion.
  1. +5 −0 app/models/actor.rb
  2. +12 −0 app/models/group.rb
  3. +1 −1 social_stream-base.gemspec
View
@@ -135,6 +135,11 @@ def find_by_webfinger!(link)
end
end
+ # Returns the email used for Mailboxer
+ def mailboxer_email
+ email
+ end
+
# The subject instance for this actor
def subject
subtype_instance ||
View
@@ -23,6 +23,18 @@ def recent_groups
merge(Contact.recent)
end
end
+
+ # Returns the email used for Mailboxer
+ def mailboxer_email
+ return email if email.present?
+ relation = group.relation_customs.sort.first
+ receivers = group.contact_actors(:direction => :sent, :relations => relation)
+ emails = Array.new
+ receivers.each do |receiver|
+ emails << receiver.mailboxer_email
+ end
+ emails
+ end
private
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
# OAuth provider
s.add_runtime_dependency('oauth-plugin','~> 0.4.0.pre1')
# Messages
- s.add_runtime_dependency('mailboxer','~> 0.3.0')
+ s.add_runtime_dependency('mailboxer','~> 0.3.1')
# Avatar manipulation
s.add_runtime_dependency('rmagick','~> 2.13.1')
# Tagging

0 comments on commit 7041b61

Please sign in to comment.