lib/mlist/list.rb in aiwilliams-mlist-0.1.6 vs lib/mlist/list.rb in aiwilliams-mlist-0.1.7

- old
+ new

@@ -23,14 +23,14 @@ def blocked?(subscriber) false end # Answers the footer content for this list. Default implementation is very - # simple right now. Expect improvements in the future. + # simple. # def footer_content(message) - %Q{The "#{label}" mailing list\nTo post messages, send email to #{post_url}} + %Q{The "#{label}" mailing list\nPost messages: #{post_url}} end # Answer a suitable label for the list, which will be used in various # parts of content that is delivered to subscribers, etc. # @@ -65,10 +65,20 @@ # def archive_url nil end + # Should the sender of an email be copied in the publication? Defaults to + # false. If _recipients_ includes the sender email address, it will be + # removed if this answers false. + # + # The sending subscriber is provided to support preferential answering. + # + def copy_sender?(subscriber) + false + end + # The web address of the list help site, nil if this is not supported. # def help_url nil end @@ -84,10 +94,17 @@ # def post_url address end + # Should the reply-to header be set to the list's address? Defaults to + # true. If false is returned, the reply-to will be the subscriber address. + # + def reply_to_list? + true + end + # The web url where subscriptions to this list may be created, nil if this # is not supported. # def subscribe_url nil @@ -98,19 +115,18 @@ # def unsubscribe_url nil end - # A list is responsible for answering the recipient subscribers. + # A list is responsible for answering the recipient subscribers. The + # answer may or may not include the subscriber; _copy_sender?_ will be + # invoked and the subscriber will be added or removed from the Array. # - # The subscriber of the incoming message is provided if the list would - # like to exclude it from the returned list. It is not assumed that it - # will be included or excluded, thereby allowing the list to decide. This - # default implementation does not include the sending subscriber in the - # list of recipients. + # The sending subscriber is provided if the list would like to utilize it + # in calculating the recipients. # def recipients(subscriber) - subscribers.reject {|s| s.email_address == subscriber.email_address} + subscribers end # A list must answer the subscriber who's email address is that of the one # provided. The default implementation will pick the first instance that # answers subscriber.email_address == email_address. Your implementation \ No newline at end of file