lib/ezmlm/list/message.rb
changeset 17 23c7f5c8ee39
parent 15 a38e6916504c
child 20 9d59d30685cb
--- a/lib/ezmlm/list/message.rb	Fri May 12 16:17:41 2017 -0700
+++ b/lib/ezmlm/list/message.rb	Tue May 16 13:58:34 2017 -0700
@@ -1,6 +1,7 @@
 #!/usr/bin/ruby
 # vim: set nosta noet ts=4 sw=4:
-#
+
+
 # An individual list message.
 #
 #    message = Ezmlm::List::Message.new( list, 24 )
@@ -31,6 +32,7 @@
 	def initialize( list, message_number=0 )
 		raise ArgumentError, "Unknown list object." unless list.respond_to?( :listdir )
 		raise ArgumentError, "Invalid message number (impossible)" if message_number < 1
+		raise "Archiving is not enabled." unless list.archived?
 		raise ArgumentError, "Invalid message number (out of list bounds)" if message_number > list.message_count
 
 		@list = list