lib/message.rb in inbox-0.18.1 vs lib/message.rb in inbox-0.18.2
- old
+ new
@@ -1,8 +1,7 @@
require 'restful_model'
require 'file'
-require 'rfc2882'
module Inbox
class Message < RestfulModel
parameter :subject
@@ -34,11 +33,11 @@
label.inflate(label_json)
label
end
if not folder.nil?
- folder = folder.new(@_api)
+ folder = Folder.new(@_api)
folder.inflate(@folder)
@folder = folder
end
end
@@ -73,14 +72,11 @@
end
def raw
model = nil
collection = RestfulModelCollection.new(Message, @_api, @namespace_id, {:message_id=>@id})
- RestClient.get("#{collection.url}/#{id}/rfc2822"){ |response,request,result|
- json = Inbox.interpret_response(result, response, {:expected_class => Object})
- model = Rfc2822.new(@_api)
- model.inflate(json)
+ RestClient.get("#{collection.url}/#{id}/", :accept => 'message/rfc822'){ |response,request,result|
+ response
}
- model
end
end
end