         }
     }
 
-    @IBOutlet weak var avatarImageView: UIImageView!
+    private var user: User?
+    var tapAvatarAction: ((user: User) -> Void)?
+
+    @IBOutlet weak var avatarImageView: UIImageView! {
+        didSet {
+            avatarImageView.userInteractionEnabled = true
+            let tap = UITapGestureRecognizer(target: self, action: "tapAvatar:")
+            avatarImageView.addGestureRecognizer(tap)
+        }
+    }
     @IBOutlet weak var avatarImageViewWidthConstraint: NSLayoutConstraint!
 
     @IBOutlet weak var redDotImageView: UIImageView!

        timeAgoLabel.text = nil

        countOfUnreadMessages = 0
    }

//    func updateUIButAvatar(sender: NSNotification) {


            if let conversationWithFriend = conversation.withFriend {

                user = conversationWithFriend

                self.nameLabel.text = conversationWithFriend.nickname

                let userAvatar = UserAvatar(userID: conversationWithFriend.userID, avatarURLString: conversationWithFriend.avatarURLString, avatarStyle: miniAvatarStyle)
