     // MARK: - Public
     
     func updateLayoutIfNeeded(for cell: MXKRoomBubbleTableViewCell, andCellData cellData: MXKRoomBubbleCellData) {
-     
-        var isMessageSenderCurrentUser: Bool = false
-        
-        if let senderId = cellData.senderId, let currentUserId = cellData.mxSession.myUserId, senderId == currentUserId {
-            isMessageSenderCurrentUser = true
-        }
-                
-        if isMessageSenderCurrentUser {
+        
+        if cellData.isSenderCurrentUser {
             self.updateLayout(forOutgoingTextMessageCell: cell, andCellData: cellData)
         } else {
             self.updateLayout(forIncomingTextMessageCell: cell, andCellData: cellData)
         }
-        
     }
             
     func updateLayout(forIncomingTextMessageCell cell: MXKRoomBubbleTableViewCell, andCellData cellData: MXKRoomBubbleCellData) {

        let messageViewMarginTop: CGFloat
        let messageViewMarginBottom: CGFloat = -2.0
        let messageViewMarginLeft: CGFloat = 3.0
        let messageViewMarginRight: CGFloat = 0.0
        
        if bubbleCell.userNameLabel != nil {
            messageViewMarginTop = 10.0


@objcMembers
class BubbleRoomCellLayoutUpdater: RoomCellLayoutUpdaterProtocol {
    
    // MARK: - Properties
    
