lib/message.rb in nylas-2.0.0 vs lib/message.rb in nylas-2.0.1

- old
+ new

@@ -36,11 +36,11 @@ label = Label.new(@_api) label.inflate(label_json) label end - if not folder.nil? + if not folder.nil? and folder.is_a?(Hash) folder = Folder.new(@_api) folder.inflate(@folder) @folder = folder end end @@ -57,16 +57,16 @@ if not @starred.nil? hash["starred"] = @starred end if not @labels.nil? and @labels != [] - hash["labels"] = @labels.map do |label| + hash["label_ids"] = @labels.map do |label| label.id end end if not @folder.nil? - hash["folder"] = @folder.id + hash["folder_id"] = @folder.id end hash end