1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00
This commit is contained in:
nov 2015-04-01 19:49:35 +09:00
parent f93918b1a5
commit 29a3e8379f
2 changed files with 4 additions and 5 deletions

View file

@ -1,7 +1,6 @@
module FbGraph2
class Conversation < Node
include Edge::Messages
register_attributes(
raw: [:snippet, :message_count, :unread_count, :can_reply, :is_subscribed],
time: [:updated_time],

View file

@ -10,10 +10,10 @@ module FbGraph2
def messages(params = {})
messages = if @_cached_messages.present? && params.blank?
@_cached_messages
else
self.edge :messages, params
end
@_cached_messages
else
self.edge :messages, params
end
messages.collect! do |message|
Message.new(message[:id], message).authenticate self.access_token
end