     let predicate = NSPredicate(format: "messageID = %@", messageID)
 
     let messages = realm.objects(Message).filter(predicate)
-
-    /*
-    if messages.count > 1 {
-        
-        println("Warning: same messageID: \(messages.count), \(messageID)")
-        
-        // Remove if dupicated
-        while messages.count > 1 {
-            if let message = messages.last {
-                
-                let messageID = message.messageID
-                
-                if let userID = YepUserDefaults.userID.value,
-                    nickname = YepUserDefaults.nickname.value{
-                        Answers.logCustomEventWithName("Dupicated Message",
-                            customAttributes: [
-                                "userID": userID,
-                                "nickname": nickname,
-                                "messageID": messageID,
-                                "time": NSDate().description
-                            ])
-                        
-                }
-                
-                let _ = try? realm.write {
-                    realm.delete(message)
-                }
-            }
-        }
-        
-//        // 治标未读
-//        let _ = try? realm.write {
-//            for message in messages {
-//                message.readed = true
-//            }
-//        }
-    }
-    */
 
     return messages.first
 }

        newFeed.group = group
        
        group.groupType = GroupType.Public.rawValue
        realm.add(newFeed)
    }
}

    return realm.objects(Message).filter(predicate).sorted("updatedUnixTime", ascending: false).first
}

func saveFeedWithDiscoveredFeed(feedData: DiscoveredFeed, group: Group, inRealm realm: Realm) {

    // save feed
    
