                                 newMember.friendState = UserFriendState.Stranger.rawValue
                             }
 
-                            //let _ = try? realm.write {
-                                realm.add(newMember)
-
-                                localMembers.append(newMember)
-                            //}
+                            realm.add(newMember)
+
+                            localMembers.append(newMember)
 
                             member = newMember
                         }


            let localGroups = realm.objects(Group)

            realm.beginWrite()

            //let _ = try? realm.write {

                var groupsToDelete = [Group]()
                for i in 0..<localGroups.count {
                    let localGroup = localGroups[i]

                    if !remoteGroupIDSet.contains(localGroup.groupID) {
                        groupsToDelete.append(localGroup)
                    }
                }

                for group in groupsToDelete {

                    // 有关联的 Feed 时就标记，不然删除

                    if let feed = group.withFeed {

                        if group.includeMe {

                            feed.deleted = true

                            // 确保被删除的 Feed 的所有消息都被标记已读
                            group.conversation?.messages.forEach { $0.readed = true }
                        }

                    } else {
                        group.cascadeDelete()
                    }
                }
            //}

            // 增加本地没有的 Group


        if let group = group {

            // 有 topic 标记 groupType 为 Public，否则 Private
            if let _ = groupInfo["topic"] {
                group.groupType = GroupType.Public.rawValue
            } else {
                group.groupType = GroupType.Private.rawValue
            }

            if group.conversation == nil {
                let conversation = Conversation()
