             return nil
         }
 
-        var distance = json["distance"] as? Double
-
-        return DiscoveredFeed(id: id, allowComment: allowComment, createdUnixTime: createdUnixTime, updatedUnixTime: updatedUnixTime, creator: creator, body: body, attachments: [], distance: distance, skill: nil, groupID: groupID, messageCount: messageCount)
+        let distance = json["distance"] as? Double
+
+        let attachments = attachmentsData.map({ DiscoveredAttachment.fromJSONDictionary($0) }).flatMap({ $0 })
+
+        return DiscoveredFeed(id: id, allowComment: allowComment, createdUnixTime: createdUnixTime, updatedUnixTime: updatedUnixTime, creator: creator, body: body, attachments: attachments, distance: distance, skill: nil, groupID: groupID, messageCount: messageCount)
     }
 }
 

            updatedUnixTime = json["updated_at"] as? NSTimeInterval,
            creatorInfo = json["user"] as? JSONDictionary,
            body = json["body"] as? String,
            //attachmentsData = json["circle"] as? [JSONDictionary], // TODO:
            //skill
            groupInfo = json["circle"] as? JSONDictionary,
            messageCount = json["message_count"] as? Int else {
                return nil

    let kind: AttachmentKind
    let metadata: String
    let URLString: String

    static func fromJSONDictionary(json: JSONDictionary) -> DiscoveredAttachment? {
        guard let
            kindString = json["kind"] as? String,
            kind = AttachmentKind(rawValue: kindString),
            metadata = json["metadata"] as? String,
            fileInfo = json["file"] as? JSONDictionary,
            URLString = fileInfo["url"] as? String else {
                return nil
        }

        return DiscoveredAttachment(kind: kind, metadata: metadata, URLString: URLString)
    }
}

struct DiscoveredFeed {
