lib/namespace.rb in inbox-0.17.1 vs lib/namespace.rb in inbox-0.17.2

- old
+ new

@@ -123,15 +123,10 @@ start_cursor = json["cursor_start"] end_cursor = json["cursor_end"] json["deltas"].each do |delta| - object = delta['object'] - if object == 'message' - # Drafts are messages underneath - object = delta['attributes']['object'] - end - cls = OBJECTS_TABLE[object] + cls = OBJECTS_TABLE[delta['object']] obj = cls.new(@_api, @namespace_id) case delta["event"] when 'create', 'modify' obj.inflate(delta['attributes'])