                     controller.subscription = subscription
                 }
             }
+        }
+    }
+
+    // MARK: Cells
+
+    private func registerCells() {
+        let collectionViewCells: [NibCellIndentifier] = [
+            (nib: BasicMessageCell.nib, cellIdentifier: BasicMessageCell.identifier),
+            (nib: SequentialMessageCell.nib, cellIdentifier: SequentialMessageCell.identifier),
+            (nib: LoaderCell.nib, cellIdentifier: LoaderCell.identifier),
+            (nib: DateSeparatorCell.nib, cellIdentifier: DateSeparatorCell.identifier),
+            (nib: UnreadMarkerCell.nib, cellIdentifier: UnreadMarkerCell.identifier),
+            (nib: AudioCell.nib, cellIdentifier: AudioCell.identifier),
+            (nib: AudioMessageCell.nib, cellIdentifier: AudioMessageCell.identifier),
+            (nib: VideoCell.nib, cellIdentifier: VideoCell.identifier),
+            (nib: VideoMessageCell.nib, cellIdentifier: VideoMessageCell.identifier),
+            (nib: ReactionsCell.nib, cellIdentifier: ReactionsCell.identifier),
+            (nib: FileCell.nib, cellIdentifier: FileCell.identifier),
+            (nib: FileMessageCell.nib, cellIdentifier: FileMessageCell.identifier),
+            (nib: TextAttachmentCell.nib, cellIdentifier: TextAttachmentCell.identifier),
+            (nib: TextAttachmentMessageCell.nib, cellIdentifier: TextAttachmentMessageCell.identifier),
+            (nib: ImageCell.nib, cellIdentifier: ImageCell.identifier),
+            (nib: ImageMessageCell.nib, cellIdentifier: ImageMessageCell.identifier),
+            (nib: QuoteCell.nib, cellIdentifier: QuoteCell.identifier),
+            (nib: QuoteMessageCell.nib, cellIdentifier: QuoteMessageCell.identifier),
+            (nib: MessageURLCell.nib, cellIdentifier: MessageURLCell.identifier),
+            (nib: MessageActionsCell.nib, cellIdentifier: MessageActionsCell.identifier)
+        ]
+
+        collectionViewCells.forEach {
+            collectionView?.register($0.nib, forCellWithReuseIdentifier: $0.cellIdentifier)
         }
     }
 

import RocketChatViewController
import RealmSwift
import DifferenceKit

protocol SizingCell: class {
    static var sizingCell: UICollectionViewCell & ChatCell { get }


        composerView.delegate = self

        registerCells()
        setupScrollToBottom()

        NotificationCenter.default.addObserver(
