lib/rturk/operations/notify_workers.rb in rturk-2.3.0 vs lib/rturk/operations/notify_workers.rb in rturk-2.3.1
- old
+ new
@@ -11,9 +11,11 @@
class NotifyWorkers < Operation
attr_accessor :worker_ids, :subject, :message_text
require_params :worker_ids, :subject, :message_text
def to_params
+ message_text.strip!
+
if worker_ids.length > 100
raise ArgumentError, 'Cannot send a message to more than 100 workers at a time.'
elsif message_text.length > 4096
raise ArgumentError, 'Message cannot be longer than 4096 characters.'
elsif subject.length > 200