lib/sapos/print/q_reader.rb in sapos-print-1.0.0 vs lib/sapos/print/q_reader.rb in sapos-print-1.0.1

- old
+ new

@@ -12,10 +12,13 @@ def self.run! reader = QReader.new callback = Pubnub::SubscribeCallback.new( message: -> (envelope){ document = Base64.decode64(envelope.result[:data][:message]['document']) - if reader.printer.print(document) + print_control = envelope.result[:data][:message]['print_control'] + document_number = envelope.result[:data][:message]['document_number'] + + if reader.printer.print(document: document, print_control: print_control, document_number: document_number) puts "OK" else puts "Printer Error".red end }, \ No newline at end of file