add file transfer in conversations

- Add a send file button in conversation view
- Add new message types in chat view with buttons to control file
  transfer interactions (accept, cancel, status, etc.)
- When receiving a file, a dialog is presented to chose a location.
  It is meant to be replaced by a settable default location.
- An animation is displayed during transfer. It will be replaced by a
  progress bar when LRC side implemented.

Change-Id: I2ea0210823d697f4ada75a33b720d63288b36983
Reviewed-by: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6159911..06968f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -313,7 +313,8 @@
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_delete.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/qrcode.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_video.png
-${CMAKE_CURRENT_SOURCE_DIR}/data/dark/pending_contact_request.png)
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/pending_contact_request.png
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_file_upload.png)
 
 SET_SOURCE_FILES_PROPERTIES(${ring_ICONS} PROPERTIES
        MACOSX_PACKAGE_LOCATION Resources)
diff --git a/data/dark/ic_file_upload.png b/data/dark/ic_file_upload.png
new file mode 100644
index 0000000..bb5d092
--- /dev/null
+++ b/data/dark/ic_file_upload.png
Binary files differ
diff --git a/src/ConversationVC.mm b/src/ConversationVC.mm
index f697506..1534901 100644
--- a/src/ConversationVC.mm
+++ b/src/ConversationVC.mm
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2016-2017 Savoir-faire Linux Inc.
+ *  Copyright (C) 2016-2018 Savoir-faire Linux Inc.
  *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
  *  Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
  *
@@ -52,6 +52,7 @@
     __unsafe_unretained IBOutlet NSTextField* conversationTitle;
     __unsafe_unretained IBOutlet NSTextField *conversationID;
     __unsafe_unretained IBOutlet IconButton* sendButton;
+    __unsafe_unretained IBOutlet IconButton *sendFileButton;
     __unsafe_unretained IBOutlet NSLayoutConstraint* sentContactRequestWidth;
     __unsafe_unretained IBOutlet NSButton* sentContactRequestButton;
     IBOutlet MessagesVC* messagesViewVC;
@@ -149,6 +150,7 @@
     NSString* bestId = bestIDForConversation(*conv, *convModel_);
     [conversationTitle setStringValue: bestName];
     [conversationID setStringValue: bestId];
+    [sendFileButton setEnabled:(convModel_->owner.contactModel->getContact(conv->participants[0]).profileInfo.type != lrc::api::profile::Type::SIP)];
 
     BOOL hideBestId = [bestNameForConversation(*conv, *convModel_) isEqualTo:bestIDForConversation(*conv, *convModel_)];
 
@@ -200,6 +202,25 @@
     }
 }
 
+- (IBAction)sendFile:(id)sender
+{
+    NSOpenPanel* filePicker = [NSOpenPanel openPanel];
+    [filePicker setCanChooseFiles:YES];
+    [filePicker setCanChooseDirectories:NO];
+    [filePicker setAllowsMultipleSelection:NO];
+
+    if ([filePicker runModal] == NSFileHandlingPanelOKButton) {
+        if ([[filePicker URLs] count] == 1) {
+            NSURL* url = [[filePicker URLs] objectAtIndex:0];
+            const char* fullPath = [url fileSystemRepresentation];
+            NSString* fileName = [url lastPathComponent];
+            if (convModel_) {
+                convModel_->sendFile(convUid_, std::string(fullPath), std::string([fileName UTF8String]));
+            }
+        }
+    }
+}
+
 - (IBAction)placeCall:(id)sender
 {
     auto* conv = [self getCurrentConversation];
diff --git a/src/MessagesVC.h b/src/MessagesVC.h
index f92e75a..8ce35c5 100644
--- a/src/MessagesVC.h
+++ b/src/MessagesVC.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2015-2017 Savoir-faire Linux Inc.
+ *  Copyright (C) 2015-2018 Savoir-faire Linux Inc.
  *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@
 
 @interface MessagesVC : NSViewController
 
--(void)setConversationUid:(const std::string)convUid model:(const lrc::api::ConversationModel*)model;
+-(void)setConversationUid:(const std::string)convUid model:(lrc::api::ConversationModel*)model;
 -(void)newMessageSent;
 
 @property (retain, nonatomic) id <MessagesVCDelegate> delegate;
diff --git a/src/MessagesVC.mm b/src/MessagesVC.mm
index 84f0659..b771330 100644
--- a/src/MessagesVC.mm
+++ b/src/MessagesVC.mm
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2015-2017 Savoir-faire Linux Inc.
+ *  Copyright (C) 2015-2018 Savoir-faire Linux Inc.
  *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
  *          Anthony Léonard <anthony.leonard@savoirfairelinux.com>
  *
@@ -38,15 +38,16 @@
     __unsafe_unretained IBOutlet NSTableView* conversationView;
 
     std::string convUid_;
-    const lrc::api::ConversationModel* convModel_;
+    lrc::api::ConversationModel* convModel_;
     const lrc::api::conversation::Info* cachedConv_;
 
-    QMetaObject::Connection newMessageSignal_;
+    QMetaObject::Connection newInteractionSignal_;
 
     // Both are needed to invalidate cached conversation as pointer
     // may not be referencing the same conversation anymore
     QMetaObject::Connection modelSortedSignal_;
     QMetaObject::Connection filterChangedSignal_;
+    QMetaObject::Connection interactionStatusUpdatedSignal_;
 }
 
 @property (nonatomic, strong, readonly) INDSequentialTextSelectionManager* selectionManager;
@@ -73,7 +74,7 @@
     return cachedConv_;
 }
 
--(void)setConversationUid:(const std::string)convUid model:(const lrc::api::ConversationModel *)model
+-(void)setConversationUid:(const std::string)convUid model:(lrc::api::ConversationModel *)model
 {
     if (convUid_ == convUid && convModel_ == model)
         return;
@@ -82,15 +83,25 @@
     convUid_ = convUid;
     convModel_ = model;
 
-    // Signal triggered when messages are received
-    QObject::disconnect(newMessageSignal_);
-    newMessageSignal_ = QObject::connect(convModel_, &lrc::api::ConversationModel::newInteraction,
+    // Signal triggered when messages are received or their status updated
+    QObject::disconnect(newInteractionSignal_);
+    QObject::disconnect(interactionStatusUpdatedSignal_);
+    newInteractionSignal_ = QObject::connect(convModel_, &lrc::api::ConversationModel::newInteraction,
                                          [self](const std::string& uid, uint64_t interactionId, const lrc::api::interaction::Info& interaction){
                                              if (uid != convUid_)
                                                  return;
+                                             cachedConv_ = nil;
                                              [conversationView reloadData];
                                              [conversationView scrollToEndOfDocument:nil];
                                          });
+    interactionStatusUpdatedSignal_ = QObject::connect(convModel_, &lrc::api::ConversationModel::interactionStatusUpdated,
+                                                       [self](const std::string& uid, uint64_t interactionId, const lrc::api::interaction::Info& interaction){
+                                                           if (uid != convUid_)
+                                                               return;
+                                                           cachedConv_ = nil;
+                                                           [conversationView reloadData];
+                                                           [conversationView scrollToEndOfDocument:nil];
+                                                       });
 
     // Signals tracking changes in conversation list, we need them as cached conversation can be invalid
     // after a reordering.
@@ -117,6 +128,57 @@
     [conversationView scrollToEndOfDocument:nil];
 }
 
+-(IMTableCellView*) makeViewforTransferStatus:(lrc::api::interaction::Status)status type:(lrc::api::interaction::Type)type tableView:(NSTableView*)tableView
+{
+    IMTableCellView* result;
+
+    // First, view is created
+    if (type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER) {
+        switch (status) {
+            case lrc::api::interaction::Status::TRANSFER_CREATED:
+            case lrc::api::interaction::Status::TRANSFER_AWAITING:
+                result = [tableView makeViewWithIdentifier:@"LeftIncomingFileView" owner:self];
+                break;
+            case lrc::api::interaction::Status::TRANSFER_ACCEPTED:
+            case lrc::api::interaction::Status::TRANSFER_ONGOING:
+                result = [tableView makeViewWithIdentifier:@"LeftOngoingFileView" owner:self];
+                [result.progressIndicator startAnimation:nil];
+                break;
+            case lrc::api::interaction::Status::TRANSFER_FINISHED:
+            case lrc::api::interaction::Status::TRANSFER_CANCELED:
+            case lrc::api::interaction::Status::TRANSFER_ERROR:
+                result = [tableView makeViewWithIdentifier:@"LeftFinishedFileView" owner:self];
+        }
+    } else if (type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER) {
+        switch (status) {
+            case lrc::api::interaction::Status::TRANSFER_CREATED:
+            case lrc::api::interaction::Status::TRANSFER_AWAITING:
+            case lrc::api::interaction::Status::TRANSFER_ONGOING:
+            case lrc::api::interaction::Status::TRANSFER_ACCEPTED:
+                result = [tableView makeViewWithIdentifier:@"RightOngoingFileView" owner:self];
+                [result.progressIndicator startAnimation:nil];
+                break;
+            case lrc::api::interaction::Status::TRANSFER_FINISHED:
+            case lrc::api::interaction::Status::TRANSFER_CANCELED:
+            case lrc::api::interaction::Status::TRANSFER_ERROR:
+                result = [tableView makeViewWithIdentifier:@"RightFinishedFileView" owner:self];
+        }
+    }
+
+    // Then status label is updated if needed
+    switch (status) {
+        case lrc::api::interaction::Status::TRANSFER_FINISHED:
+            [result.statusLabel setStringValue:@"Success"];
+            break;
+        case lrc::api::interaction::Status::TRANSFER_CANCELED:
+            [result.statusLabel setStringValue:@"Canceled"];
+            break;
+        case lrc::api::interaction::Status::TRANSFER_ERROR:
+            [result.statusLabel setStringValue:@"Failed"];
+    }
+    return result;
+}
+
 #pragma mark - NSTableViewDelegate methods
 - (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row
 {
@@ -137,14 +199,16 @@
 
     // HACK HACK HACK HACK HACK
     // The following code has to be replaced when every views are implemented for every interaction types
-    // This is an iterator which "jumps over" any interaction which is not a text one.
+    // This is an iterator which "jumps over" any interaction which is not a text or datatransfer one.
     // It behaves as if interaction list was only containing text interactions.
     std::map<uint64_t, lrc::api::interaction::Info>::const_iterator it;
 
     {
         int msgCount = 0;
         it = std::find_if(conv->interactions.begin(), conv->interactions.end(), [&msgCount, row](const std::pair<uint64_t, lrc::api::interaction::Info>& inter) {
-            if (inter.second.type == lrc::api::interaction::Type::TEXT) {
+            if (inter.second.type == lrc::api::interaction::Type::TEXT
+                || inter.second.type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER
+                || inter.second.type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER) {
                 if (msgCount == row) {
                     return true;
                 } else {
@@ -163,17 +227,22 @@
 
     auto& interaction = it->second;
 
-    // TODO Implement interactions other than messages
-    if(interaction.type != lrc::api::interaction::Type::TEXT) {
-        return nil;
-    }
-
     bool isOutgoing = lrc::api::interaction::isOutgoing(interaction);
 
-    if (isOutgoing) {
-        result = [tableView makeViewWithIdentifier:@"RightMessageView" owner:self];
-    } else {
-        result = [tableView makeViewWithIdentifier:@"LeftMessageView" owner:self];
+    switch (interaction.type) {
+        case lrc::api::interaction::Type::TEXT:
+            if (isOutgoing) {
+                result = [tableView makeViewWithIdentifier:@"RightMessageView" owner:self];
+            } else {
+                result = [tableView makeViewWithIdentifier:@"LeftMessageView" owner:self];
+            }
+            break;
+        case lrc::api::interaction::Type::INCOMING_DATA_TRANSFER:
+        case lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER:
+            result = [self makeViewforTransferStatus:interaction.status type:interaction.type tableView:tableView];
+            break;
+        default:  // If interaction is not of a known type
+            return nil;
     }
 
     // check if the message first in incoming or outgoing messages sequence
@@ -182,12 +251,14 @@
         auto previousIt = it;
         previousIt--;
         auto& previousInteraction = previousIt->second;
-        if (previousInteraction.type == lrc::api::interaction::Type::TEXT && (isOutgoing == lrc::api::interaction::isOutgoing(previousInteraction)))
+        if ((previousInteraction.type == lrc::api::interaction::Type::TEXT
+             || previousInteraction.type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER
+             || previousInteraction.type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER) && (isOutgoing == lrc::api::interaction::isOutgoing(previousInteraction)))
             isFirstInSequence = false;
     }
     [result.photoView setHidden:!isFirstInSequence];
     result.msgBackground.needPointer = isFirstInSequence;
-    [result setup];
+    [result setupForInteraction:it->first];
 
     NSMutableAttributedString* msgAttString =
     [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@\n",@(interaction.body.c_str())]
@@ -235,14 +306,16 @@
 
     // HACK HACK HACK HACK HACK
     // The following code has to be replaced when every views are implemented for every interaction types
-    // This is an iterator which "jumps over" any interaction which is not a text one.
+    // This is an iterator which "jumps over" any interaction which is not a text or datatransfer one.
     // It behaves as if interaction list was only containing text interactions.
     std::map<uint64_t, lrc::api::interaction::Info>::const_iterator it;
 
     {
         int msgCount = 0;
         it = std::find_if(conv->interactions.begin(), conv->interactions.end(), [&msgCount, row](const std::pair<uint64_t, lrc::api::interaction::Info>& inter) {
-            if (inter.second.type == lrc::api::interaction::Type::TEXT) {
+            if (inter.second.type == lrc::api::interaction::Type::TEXT
+                || inter.second.type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER
+                || inter.second.type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER) {
                 if (msgCount == row) {
                     return true;
                 } else {
@@ -259,6 +332,9 @@
 
     auto& interaction = it->second;
 
+    if(interaction.type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER || interaction.type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER)
+        return 52.0;
+
     // TODO Implement interactions other than messages
     if(interaction.type != lrc::api::interaction::Type::TEXT) {
         return 0;
@@ -297,8 +373,11 @@
     if (conv) {
         int count;
         count = std::count_if(conv->interactions.begin(), conv->interactions.end(), [](const std::pair<uint64_t, lrc::api::interaction::Info>& inter) {
-            return inter.second.type == lrc::api::interaction::Type::TEXT;
+            return inter.second.type == lrc::api::interaction::Type::TEXT
+            || inter.second.type == lrc::api::interaction::Type::INCOMING_DATA_TRANSFER
+            || inter.second.type == lrc::api::interaction::Type::OUTGOING_DATA_TRANSFER;
         });
+        NSLog(@"$$$ Interaction count: %d", count);
         return count;
     }
     return 0;
@@ -361,4 +440,27 @@
      return aMutableParagraphStyle;
 }
 
+#pragma mark - Actions
+
+- (IBAction)acceptIncomingFile:(id)sender {
+    auto interId = [(IMTableCellView*)[[sender superview] superview] interaction];
+    auto& inter = [self getCurrentConversation]->interactions.find(interId)->second;
+    if (convModel_ && !convUid_.empty()) {
+        NSSavePanel* filePicker = [NSSavePanel savePanel];
+        [filePicker setNameFieldStringValue:@(inter.body.c_str())];
+
+        if ([filePicker runModal] == NSFileHandlingPanelOKButton) {
+            const char* fullPath = [[filePicker URL] fileSystemRepresentation];
+            convModel_->acceptTransfer(convUid_, interId, fullPath);
+        }
+    }
+}
+
+- (IBAction)declineIncomingFile:(id)sender {
+    auto inter = [(IMTableCellView*)[[sender superview] superview] interaction];
+    if (convModel_ && !convUid_.empty()) {
+        convModel_->cancelTransfer(convUid_, inter);
+    }
+}
+
 @end
diff --git a/src/views/IMTableCellView.h b/src/views/IMTableCellView.h
index 110dfb6..e9b5cde 100644
--- a/src/views/IMTableCellView.h
+++ b/src/views/IMTableCellView.h
@@ -1,6 +1,7 @@
 /*
- *  Copyright (C) 2016 Savoir-faire Linux Inc.
+ *  Copyright (C) 2016-2018 Savoir-faire Linux Inc.
  *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *  Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -25,8 +26,14 @@
 @property (nonatomic, strong) IBOutlet NSImageView* photoView;
 @property (nonatomic, strong) IBOutlet NSTextView* msgView;
 @property (nonatomic, strong) IBOutlet MessageBubbleView* msgBackground;
+@property (nonatomic, strong) IBOutlet NSButton* acceptButton;
+@property (nonatomic, strong) IBOutlet NSButton* declineButton;
+@property (nonatomic, strong) IBOutlet NSProgressIndicator* progressIndicator;
+@property (nonatomic, strong) IBOutlet NSTextField* statusLabel;
 
-- (void) setup;
+
+- (uint64_t) interaction;
+- (void) setupForInteraction:(uint64_t)inter;
 - (void) updateWidthConstraint:(CGFloat) newWidth;
 
 @end
diff --git a/src/views/IMTableCellView.mm b/src/views/IMTableCellView.mm
index 56a7eea..2d86cc9 100644
--- a/src/views/IMTableCellView.mm
+++ b/src/views/IMTableCellView.mm
@@ -1,6 +1,7 @@
 /*
- *  Copyright (C) 2016 Savoir-faire Linux Inc.
+ *  Copyright (C) 2016-2018 Savoir-faire Linux Inc.
  *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *  Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -18,25 +19,35 @@
  */
 
 #import "IMTableCellView.h"
-
 #import "NSColor+RingTheme.h"
 
-@implementation IMTableCellView
+@implementation IMTableCellView {
+    uint64_t interaction;
+}
+
 @synthesize msgView;
 @synthesize photoView;
+@synthesize acceptButton;
+@synthesize declineButton;
+@synthesize progressIndicator;
+@synthesize statusLabel;
 
-
-- (void) setup
+- (void) setupDirection
 {
-    if ([self.identifier isEqualToString:@"RightMessageView"]) {
+    if ([self.identifier containsString:@"Right"]) {
         self.msgBackground.pointerDirection = RIGHT;
         self.msgBackground.bgColor = [NSColor ringLightBlue];
-
     }
     else {
         self.msgBackground.pointerDirection = LEFT;
         self.msgBackground.bgColor = [NSColor whiteColor];
     }
+}
+
+- (void) setupForInteraction:(uint64_t)inter
+{
+    interaction = inter;
+    [self setupDirection];
     [self.msgView setBackgroundColor:[NSColor clearColor]];
     [self.msgView setString:@""];
     [self.msgView setAutoresizingMask:NSViewWidthSizable];
@@ -45,11 +56,14 @@
     [self.msgBackground setAutoresizingMask:NSViewHeightSizable];
     [self.msgView setEnabledTextCheckingTypes:NSTextCheckingTypeLink];
     [self.msgView setAutomaticLinkDetectionEnabled:YES];
-    [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-5-[msgView]"
-                                                                options:0
-                                                                metrics:nil
-                                                                  views:NSDictionaryOfVariableBindings(msgView)]];
-   }
+    [self.msgView setEditable:NO];
+    if ([self.identifier containsString:@"Message"]) {
+        [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-5-[msgView]"
+                                                                     options:0
+                                                                     metrics:nil
+                                                                       views:NSDictionaryOfVariableBindings(msgView)]];
+    }
+}
 
 - (void) updateWidthConstraint:(CGFloat) newWidth
 {
@@ -66,4 +80,9 @@
     [self.msgView addConstraint:constraint];
 }
 
+- (uint64_t)interaction
+{
+    return interaction;
+}
+
 @end
diff --git a/ui/Base.lproj/Conversation.xib b/ui/Base.lproj/Conversation.xib
index 5ffc41d..b10e49a 100644
--- a/ui/Base.lproj/Conversation.xib
+++ b/ui/Base.lproj/Conversation.xib
@@ -13,6 +13,7 @@
                 <outlet property="messageField" destination="bsk-Gj-qQ2" id="JYN-bF-ttw"/>
                 <outlet property="messagesViewVC" destination="iH6-17-JsM" id="uxH-Ra-lSr"/>
                 <outlet property="sendButton" destination="UJf-cF-RAo" id="8PF-7G-w1d"/>
+                <outlet property="sendFileButton" destination="gwx-eT-PcN" id="BMw-53-phy"/>
                 <outlet property="sendPanel" destination="Rth-di-Tls" id="vCd-kM-DLc"/>
                 <outlet property="titleCenteredConstraint" destination="uTp-kU-NmC" id="ccn-92-zaA"/>
                 <outlet property="titleTopConstraint" destination="32s-Wp-DE1" id="fms-Yu-vrn"/>
@@ -77,7 +78,6 @@
                                                                     <constraint firstAttribute="trailing" secondItem="70Z-up-big" secondAttribute="trailing" id="EsS-Iy-hGM"/>
                                                                     <constraint firstAttribute="bottom" secondItem="70Z-up-big" secondAttribute="bottom" id="IYL-SU-tEA"/>
                                                                     <constraint firstItem="70Z-up-big" firstAttribute="top" secondItem="VYf-4a-zyd" secondAttribute="top" id="jqQ-81-SYd"/>
-                                                                    <constraint firstItem="70Z-up-big" firstAttribute="leading" secondItem="VYf-4a-zyd" secondAttribute="leading" id="pr1-76-hIi"/>
                                                                 </constraints>
                                                             </customView>
                                                         </subviews>
@@ -116,7 +116,6 @@
                                                                 <constraints>
                                                                     <constraint firstAttribute="bottom" secondItem="gob-L5-RgR" secondAttribute="bottom" id="3w5-QY-yhR"/>
                                                                     <constraint firstAttribute="trailing" secondItem="gob-L5-RgR" secondAttribute="trailing" id="IB6-Za-sb1"/>
-                                                                    <constraint firstItem="gob-L5-RgR" firstAttribute="leading" secondItem="Sfu-lT-vTc" secondAttribute="leading" id="htJ-gy-wR1"/>
                                                                     <constraint firstItem="gob-L5-RgR" firstAttribute="top" secondItem="Sfu-lT-vTc" secondAttribute="top" id="slK-P7-XoB"/>
                                                                 </constraints>
                                                             </customView>
@@ -134,6 +133,319 @@
                                                             <outlet property="photoView" destination="HA2-42-bNS" id="sCn-k7-x60"/>
                                                         </connections>
                                                     </tableCellView>
+                                                    <tableCellView identifier="RightOngoingFileView" id="f7f-vE-9kV" userLabel="IMTableCellView" customClass="IMTableCellView">
+                                                        <rect key="frame" x="1" y="125" width="697" height="60"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="6ZV-0W-v6y">
+                                                                <rect key="frame" x="657" y="15" width="40" height="40"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="40" id="QUs-oq-f5l"/>
+                                                                    <constraint firstAttribute="width" constant="40" id="w1W-3e-vMf"/>
+                                                                </constraints>
+                                                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="MUe-8z-ojQ"/>
+                                                            </imageView>
+                                                            <customView ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="288-cW-DUh" customClass="MessageBubbleView">
+                                                                <rect key="frame" x="5" y="5" width="637" height="50"/>
+                                                                <subviews>
+                                                                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oA1-1W-48a" userLabel="Decline">
+                                                                        <rect key="frame" x="36" y="6" width="44" height="43"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="width" constant="32" id="eno-jd-EES"/>
+                                                                            <constraint firstAttribute="height" constant="32" id="whe-B6-NjG"/>
+                                                                        </constraints>
+                                                                        <buttonCell key="cell" type="push" bezelStyle="rounded" image="ic_action_cancel" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Owp-AR-dig">
+                                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                                            <font key="font" metaFont="system"/>
+                                                                        </buttonCell>
+                                                                        <connections>
+                                                                            <action selector="declineIncomingFile:" target="iH6-17-JsM" id="ct1-HB-Dn6"/>
+                                                                        </connections>
+                                                                    </button>
+                                                                    <progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" doubleValue="33" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="RQe-25-hLb">
+                                                                        <rect key="frame" x="5" y="13" width="32" height="32"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="width" constant="32" id="VnX-XK-8ca"/>
+                                                                        </constraints>
+                                                                    </progressIndicator>
+                                                                    <customView horizontalCompressionResistancePriority="250" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OYt-X6-K8Z" customClass="NSTextView">
+                                                                        <rect key="frame" x="74" y="0.0" width="637" height="50"/>
+                                                                    </customView>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="OYt-X6-K8Z" firstAttribute="top" secondItem="288-cW-DUh" secondAttribute="top" id="0w3-eS-T0V"/>
+                                                                    <constraint firstAttribute="trailing" secondItem="OYt-X6-K8Z" secondAttribute="trailing" id="4mQ-qU-7Y7"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="OYt-X6-K8Z" secondAttribute="bottom" id="Ad6-EC-9Du"/>
+                                                                    <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="oA1-1W-48a" secondAttribute="bottom" constant="5" id="GH0-Dl-Zm5"/>
+                                                                    <constraint firstItem="oA1-1W-48a" firstAttribute="leading" secondItem="RQe-25-hLb" secondAttribute="trailing" constant="5" id="N9y-Ub-YcP"/>
+                                                                    <constraint firstItem="RQe-25-hLb" firstAttribute="leading" secondItem="288-cW-DUh" secondAttribute="leading" constant="5" id="Q4J-tW-vxk"/>
+                                                                    <constraint firstItem="OYt-X6-K8Z" firstAttribute="leading" secondItem="oA1-1W-48a" secondAttribute="trailing" id="RB7-Go-yT0"/>
+                                                                    <constraint firstItem="oA1-1W-48a" firstAttribute="top" secondItem="288-cW-DUh" secondAttribute="top" constant="5" id="bmm-Bb-vGK"/>
+                                                                    <constraint firstItem="RQe-25-hLb" firstAttribute="centerY" secondItem="oA1-1W-48a" secondAttribute="centerY" id="dbW-7T-VKp"/>
+                                                                </constraints>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="288-cW-DUh" firstAttribute="top" secondItem="f7f-vE-9kV" secondAttribute="top" constant="5" id="189-x9-b4Q"/>
+                                                            <constraint firstItem="6ZV-0W-v6y" firstAttribute="leading" secondItem="288-cW-DUh" secondAttribute="trailing" constant="2" id="Eob-bX-rsc"/>
+                                                            <constraint firstAttribute="trailing" secondItem="6ZV-0W-v6y" secondAttribute="trailing" id="FFU-0x-vz5"/>
+                                                            <constraint firstAttribute="bottom" secondItem="288-cW-DUh" secondAttribute="bottom" constant="5" id="IDq-mx-De5"/>
+                                                            <constraint firstItem="6ZV-0W-v6y" firstAttribute="top" secondItem="f7f-vE-9kV" secondAttribute="top" constant="5" id="yuG-tg-EgK"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <outlet property="declineButton" destination="oA1-1W-48a" id="u4X-s7-mLU"/>
+                                                            <outlet property="msgBackground" destination="288-cW-DUh" id="koc-Gd-hgM"/>
+                                                            <outlet property="msgView" destination="OYt-X6-K8Z" id="feR-5l-GtK"/>
+                                                            <outlet property="photoView" destination="6ZV-0W-v6y" id="h61-cj-yop"/>
+                                                            <outlet property="progressIndicator" destination="RQe-25-hLb" id="yTf-O0-SLK"/>
+                                                        </connections>
+                                                    </tableCellView>
+                                                    <tableCellView identifier="RightFinishedFileView" id="4Sx-gX-5hR" userLabel="IMTableCellView" customClass="IMTableCellView">
+                                                        <rect key="frame" x="1" y="187" width="697" height="60"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="Ayo-jj-LFy">
+                                                                <rect key="frame" x="657" y="15" width="40" height="40"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="40" id="Xsx-aB-mSP"/>
+                                                                    <constraint firstAttribute="width" constant="40" id="Ybl-P2-4he"/>
+                                                                </constraints>
+                                                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="qXk-fg-A5x"/>
+                                                            </imageView>
+                                                            <customView ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PRw-Bx-lOE" customClass="MessageBubbleView">
+                                                                <rect key="frame" x="5" y="5" width="637" height="50"/>
+                                                                <subviews>
+                                                                    <customView horizontalCompressionResistancePriority="250" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Eay-Qd-gzU" customClass="NSTextView">
+                                                                        <rect key="frame" x="48" y="0.0" width="637" height="50"/>
+                                                                    </customView>
+                                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yyn-kD-JYn" userLabel="Status Label">
+                                                                        <rect key="frame" x="3" y="17" width="47" height="17"/>
+                                                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Status" id="9UH-bZ-Dh4">
+                                                                            <font key="font" metaFont="system"/>
+                                                                            <color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                        </textFieldCell>
+                                                                    </textField>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="bottom" secondItem="Eay-Qd-gzU" secondAttribute="bottom" id="2Mf-LT-vm4"/>
+                                                                    <constraint firstItem="yyn-kD-JYn" firstAttribute="leading" secondItem="PRw-Bx-lOE" secondAttribute="leading" constant="5" id="Fbh-Rh-T7h"/>
+                                                                    <constraint firstItem="Eay-Qd-gzU" firstAttribute="leading" secondItem="yyn-kD-JYn" secondAttribute="trailing" id="U7x-zY-aVr"/>
+                                                                    <constraint firstAttribute="trailing" secondItem="Eay-Qd-gzU" secondAttribute="trailing" id="Z9N-9J-pyy"/>
+                                                                    <constraint firstItem="yyn-kD-JYn" firstAttribute="centerY" secondItem="PRw-Bx-lOE" secondAttribute="centerY" id="bRX-OM-beQ"/>
+                                                                    <constraint firstItem="Eay-Qd-gzU" firstAttribute="top" secondItem="PRw-Bx-lOE" secondAttribute="top" id="v7Y-pr-j64"/>
+                                                                </constraints>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstAttribute="trailing" secondItem="Ayo-jj-LFy" secondAttribute="trailing" id="3mw-Ec-2zY"/>
+                                                            <constraint firstItem="Ayo-jj-LFy" firstAttribute="top" secondItem="4Sx-gX-5hR" secondAttribute="top" constant="5" id="EBF-pl-GH2"/>
+                                                            <constraint firstItem="Ayo-jj-LFy" firstAttribute="leading" secondItem="PRw-Bx-lOE" secondAttribute="trailing" constant="2" id="GQX-Cp-IUU"/>
+                                                            <constraint firstAttribute="bottom" secondItem="PRw-Bx-lOE" secondAttribute="bottom" constant="5" id="cLM-O7-7x9"/>
+                                                            <constraint firstItem="PRw-Bx-lOE" firstAttribute="top" secondItem="4Sx-gX-5hR" secondAttribute="top" constant="5" id="q5m-ch-0IR"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <outlet property="msgBackground" destination="PRw-Bx-lOE" id="Lgp-wk-Xx5"/>
+                                                            <outlet property="msgView" destination="Eay-Qd-gzU" id="AsA-MB-ZdR"/>
+                                                            <outlet property="photoView" destination="Ayo-jj-LFy" id="rbR-Xf-oze"/>
+                                                            <outlet property="statusLabel" destination="yyn-kD-JYn" id="SGR-Ih-255"/>
+                                                        </connections>
+                                                    </tableCellView>
+                                                    <tableCellView identifier="LeftIncomingFileView" id="Odu-Nr-199" userLabel="IMTableCellView" customClass="IMTableCellView">
+                                                        <rect key="frame" x="1" y="249" width="697" height="60"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="Mx0-t4-qXG">
+                                                                <rect key="frame" x="0.0" y="15" width="40" height="40"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="40" id="CYH-Z6-b8M"/>
+                                                                    <constraint firstAttribute="width" constant="40" id="naJ-gi-89J"/>
+                                                                </constraints>
+                                                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="g6c-CI-X0M"/>
+                                                            </imageView>
+                                                            <customView ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="J5n-7R-huf" customClass="MessageBubbleView">
+                                                                <rect key="frame" x="55" y="10" width="605" height="40"/>
+                                                                <subviews>
+                                                                    <button verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wSq-TJ-Fxq" userLabel="Accept">
+                                                                        <rect key="frame" x="562" y="6" width="44" height="43"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="width" constant="32" id="Dhe-TU-Erm"/>
+                                                                            <constraint firstAttribute="height" constant="32" id="mCf-09-bRq"/>
+                                                                        </constraints>
+                                                                        <buttonCell key="cell" type="push" bezelStyle="rounded" image="ic_action_accept" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="knW-8b-nvH">
+                                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                                            <font key="font" metaFont="system"/>
+                                                                        </buttonCell>
+                                                                        <connections>
+                                                                            <action selector="acceptIncomingFile:" target="iH6-17-JsM" id="Tq9-dO-tCJ"/>
+                                                                        </connections>
+                                                                    </button>
+                                                                    <button verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Z5E-G0-jlX" userLabel="Decline">
+                                                                        <rect key="frame" x="530" y="6" width="44" height="43"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="width" constant="32" id="7US-mA-f8t"/>
+                                                                            <constraint firstAttribute="height" constant="32" id="euz-XP-VIf"/>
+                                                                        </constraints>
+                                                                        <buttonCell key="cell" type="push" bezelStyle="rounded" image="ic_action_cancel" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="KMv-4s-k77">
+                                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                                            <font key="font" metaFont="system"/>
+                                                                        </buttonCell>
+                                                                        <connections>
+                                                                            <action selector="declineIncomingFile:" target="iH6-17-JsM" id="vbO-mr-Vca"/>
+                                                                        </connections>
+                                                                    </button>
+                                                                    <customView horizontalCompressionResistancePriority="250" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rCz-99-NJH" customClass="NSTextView">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="605" height="40"/>
+                                                                    </customView>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="wSq-TJ-Fxq" secondAttribute="bottom" constant="5" id="5jC-hz-Yxp"/>
+                                                                    <constraint firstItem="rCz-99-NJH" firstAttribute="top" secondItem="J5n-7R-huf" secondAttribute="top" id="7ST-Y0-6Cq"/>
+                                                                    <constraint firstItem="Z5E-G0-jlX" firstAttribute="top" secondItem="J5n-7R-huf" secondAttribute="top" constant="5" id="Clg-8G-RD9"/>
+                                                                    <constraint firstItem="Z5E-G0-jlX" firstAttribute="leading" secondItem="rCz-99-NJH" secondAttribute="trailing" constant="5" id="ZLY-qk-XVH"/>
+                                                                    <constraint firstItem="rCz-99-NJH" firstAttribute="leading" secondItem="J5n-7R-huf" secondAttribute="leading" id="bcC-K6-60G"/>
+                                                                    <constraint firstItem="wSq-TJ-Fxq" firstAttribute="top" secondItem="J5n-7R-huf" secondAttribute="top" constant="5" id="lDu-jH-4ZI"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="rCz-99-NJH" secondAttribute="bottom" id="nX4-e8-YpD"/>
+                                                                    <constraint firstAttribute="trailing" secondItem="wSq-TJ-Fxq" secondAttribute="trailing" constant="5" id="oUi-Yb-fYT"/>
+                                                                    <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Z5E-G0-jlX" secondAttribute="bottom" constant="5" id="pMb-Yj-JJH"/>
+                                                                    <constraint firstItem="wSq-TJ-Fxq" firstAttribute="leading" secondItem="Z5E-G0-jlX" secondAttribute="trailing" constant="5" id="z00-ml-93t"/>
+                                                                </constraints>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="Mx0-t4-qXG" firstAttribute="leading" secondItem="Odu-Nr-199" secondAttribute="leading" id="3vm-v9-cOX"/>
+                                                            <constraint firstItem="Mx0-t4-qXG" firstAttribute="top" secondItem="Odu-Nr-199" secondAttribute="top" constant="5" id="KUS-OA-Pbc"/>
+                                                            <constraint firstItem="J5n-7R-huf" firstAttribute="leading" secondItem="Mx0-t4-qXG" secondAttribute="trailing" constant="2" id="b3C-Nz-woA"/>
+                                                            <constraint firstAttribute="bottom" secondItem="J5n-7R-huf" secondAttribute="bottom" constant="5" id="laY-Fk-kHl"/>
+                                                            <constraint firstItem="J5n-7R-huf" firstAttribute="top" secondItem="Odu-Nr-199" secondAttribute="top" constant="5" id="oOe-mF-FMF"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <outlet property="acceptButton" destination="wSq-TJ-Fxq" id="cgs-PK-dTN"/>
+                                                            <outlet property="declineButton" destination="Z5E-G0-jlX" id="7gs-ee-HQ2"/>
+                                                            <outlet property="msgBackground" destination="J5n-7R-huf" id="Pk6-3e-pep"/>
+                                                            <outlet property="msgView" destination="rCz-99-NJH" id="ylK-rc-y4t"/>
+                                                            <outlet property="photoView" destination="Mx0-t4-qXG" id="Rna-gq-ahd"/>
+                                                        </connections>
+                                                    </tableCellView>
+                                                    <tableCellView identifier="LeftOngoingFileView" id="CHz-G3-A9X" userLabel="IMTableCellView" customClass="IMTableCellView">
+                                                        <rect key="frame" x="1" y="311" width="697" height="60"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="rA1-FV-pqD">
+                                                                <rect key="frame" x="0.0" y="15" width="40" height="40"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="40" id="fzP-wx-JhH"/>
+                                                                    <constraint firstAttribute="width" constant="40" id="vr5-jk-25y"/>
+                                                                </constraints>
+                                                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="FuY-pz-D94"/>
+                                                            </imageView>
+                                                            <customView ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6a5-Sv-RTW" customClass="MessageBubbleView">
+                                                                <rect key="frame" x="55" y="10" width="605" height="40"/>
+                                                                <subviews>
+                                                                    <button verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HMc-FM-eyU" userLabel="Decline">
+                                                                        <rect key="frame" x="530" y="6" width="44" height="43"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="width" constant="32" id="E8F-5q-Wpm"/>
+                                                                            <constraint firstAttribute="height" constant="32" id="loH-Lp-2pk"/>
+                                                                        </constraints>
+                                                                        <buttonCell key="cell" type="push" bezelStyle="rounded" image="ic_action_cancel" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fhl-9d-Q8d">
+                                                                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                                            <font key="font" metaFont="system"/>
+                                                                        </buttonCell>
+                                                                        <connections>
+                                                                            <action selector="declineIncomingFile:" target="iH6-17-JsM" id="lZ3-6d-6rG"/>
+                                                                        </connections>
+                                                                    </button>
+                                                                    <progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" ambiguous="YES" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="r9c-sr-4T8" userLabel="Progress Indicator">
+                                                                        <rect key="frame" x="575" y="13" width="32" height="32"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="32" id="4Jx-qB-KkC"/>
+                                                                            <constraint firstAttribute="width" constant="32" id="EUi-fn-PKE"/>
+                                                                        </constraints>
+                                                                    </progressIndicator>
+                                                                    <customView horizontalCompressionResistancePriority="250" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7RV-DW-36s" customClass="NSTextView">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="605" height="40"/>
+                                                                    </customView>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="r9c-sr-4T8" firstAttribute="leading" secondItem="HMc-FM-eyU" secondAttribute="trailing" constant="5" id="Eb9-Le-O2g"/>
+                                                                    <constraint firstItem="7RV-DW-36s" firstAttribute="top" secondItem="6a5-Sv-RTW" secondAttribute="top" id="F3k-8s-bif"/>
+                                                                    <constraint firstAttribute="trailing" secondItem="r9c-sr-4T8" secondAttribute="trailing" constant="5" id="H20-PK-xmk"/>
+                                                                    <constraint firstItem="r9c-sr-4T8" firstAttribute="centerY" secondItem="HMc-FM-eyU" secondAttribute="centerY" id="Rs6-7X-YSS"/>
+                                                                    <constraint firstItem="HMc-FM-eyU" firstAttribute="leading" secondItem="7RV-DW-36s" secondAttribute="trailing" constant="5" id="WT2-Pq-oRs"/>
+                                                                    <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="HMc-FM-eyU" secondAttribute="bottom" constant="5" id="YuN-gQ-XPV"/>
+                                                                    <constraint firstItem="7RV-DW-36s" firstAttribute="leading" secondItem="6a5-Sv-RTW" secondAttribute="leading" id="dAp-5z-uJx"/>
+                                                                    <constraint firstItem="HMc-FM-eyU" firstAttribute="top" secondItem="6a5-Sv-RTW" secondAttribute="top" constant="5" id="dhQ-9i-WIp"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="7RV-DW-36s" secondAttribute="bottom" id="yYR-NR-qzg"/>
+                                                                </constraints>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="rA1-FV-pqD" firstAttribute="top" secondItem="CHz-G3-A9X" secondAttribute="top" constant="5" id="FF7-iT-f6H"/>
+                                                            <constraint firstItem="6a5-Sv-RTW" firstAttribute="leading" secondItem="rA1-FV-pqD" secondAttribute="trailing" constant="2" id="Qfy-Lo-Ld7"/>
+                                                            <constraint firstItem="6a5-Sv-RTW" firstAttribute="top" secondItem="CHz-G3-A9X" secondAttribute="top" constant="5" id="Xym-5G-K13"/>
+                                                            <constraint firstAttribute="bottom" secondItem="6a5-Sv-RTW" secondAttribute="bottom" constant="5" id="uyT-xw-0Dt"/>
+                                                            <constraint firstItem="rA1-FV-pqD" firstAttribute="leading" secondItem="CHz-G3-A9X" secondAttribute="leading" id="wrI-ab-uok"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <outlet property="declineButton" destination="HMc-FM-eyU" id="HPP-Zh-pWk"/>
+                                                            <outlet property="msgBackground" destination="6a5-Sv-RTW" id="y39-jd-8xS"/>
+                                                            <outlet property="msgView" destination="7RV-DW-36s" id="j1R-oc-xBX"/>
+                                                            <outlet property="photoView" destination="rA1-FV-pqD" id="ujZ-qR-aoI"/>
+                                                            <outlet property="progressIndicator" destination="r9c-sr-4T8" id="4WO-SM-3hK"/>
+                                                        </connections>
+                                                    </tableCellView>
+                                                    <tableCellView identifier="LeftFinishedFileView" id="uhL-Ve-VU7" userLabel="IMTableCellView" customClass="IMTableCellView">
+                                                        <rect key="frame" x="1" y="373" width="697" height="60"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="Rqb-9f-Zoq">
+                                                                <rect key="frame" x="0.0" y="15" width="40" height="40"/>
+                                                                <constraints>
+                                                                    <constraint firstAttribute="height" constant="40" id="LTJ-IZ-3Gu"/>
+                                                                    <constraint firstAttribute="width" constant="40" id="PZo-zB-kO5"/>
+                                                                </constraints>
+                                                                <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="SOa-ju-8N4"/>
+                                                            </imageView>
+                                                            <customView ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kx7-K6-Not" customClass="MessageBubbleView">
+                                                                <rect key="frame" x="55" y="10" width="605" height="40"/>
+                                                                <subviews>
+                                                                    <customView horizontalCompressionResistancePriority="250" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o5P-Ba-cmY" customClass="NSTextView">
+                                                                        <rect key="frame" x="0.0" y="0.0" width="605" height="40"/>
+                                                                    </customView>
+                                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YQ5-ba-kO1" userLabel="Status Label">
+                                                                        <rect key="frame" x="548" y="17" width="43" height="17"/>
+                                                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Status" id="wda-AH-f6w">
+                                                                            <font key="font" metaFont="system"/>
+                                                                            <color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                        </textFieldCell>
+                                                                    </textField>
+                                                                </subviews>
+                                                                <constraints>
+                                                                    <constraint firstItem="o5P-Ba-cmY" firstAttribute="leading" secondItem="Kx7-K6-Not" secondAttribute="leading" id="JvE-B3-K2i"/>
+                                                                    <constraint firstAttribute="trailing" secondItem="YQ5-ba-kO1" secondAttribute="trailing" constant="5" id="aYy-ZZ-ChA"/>
+                                                                    <constraint firstItem="YQ5-ba-kO1" firstAttribute="leading" secondItem="o5P-Ba-cmY" secondAttribute="trailing" id="byM-WN-BoL"/>
+                                                                    <constraint firstAttribute="bottom" secondItem="o5P-Ba-cmY" secondAttribute="bottom" id="igc-YG-x7g"/>
+                                                                    <constraint firstItem="o5P-Ba-cmY" firstAttribute="top" secondItem="Kx7-K6-Not" secondAttribute="top" id="lVY-Rs-Wde"/>
+                                                                    <constraint firstItem="YQ5-ba-kO1" firstAttribute="centerY" secondItem="Kx7-K6-Not" secondAttribute="centerY" id="stn-hm-WVf"/>
+                                                                </constraints>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="Kx7-K6-Not" firstAttribute="leading" secondItem="Rqb-9f-Zoq" secondAttribute="trailing" constant="2" id="7Ka-Rf-v9d"/>
+                                                            <constraint firstItem="Kx7-K6-Not" firstAttribute="top" secondItem="uhL-Ve-VU7" secondAttribute="top" constant="5" id="87q-V7-EcF"/>
+                                                            <constraint firstItem="Rqb-9f-Zoq" firstAttribute="top" secondItem="uhL-Ve-VU7" secondAttribute="top" constant="5" id="dNk-da-JyN"/>
+                                                            <constraint firstItem="Rqb-9f-Zoq" firstAttribute="leading" secondItem="uhL-Ve-VU7" secondAttribute="leading" id="etr-El-H0q"/>
+                                                            <constraint firstAttribute="bottom" secondItem="Kx7-K6-Not" secondAttribute="bottom" constant="5" id="owe-iS-CLq"/>
+                                                        </constraints>
+                                                        <connections>
+                                                            <outlet property="msgBackground" destination="Kx7-K6-Not" id="Hpi-s1-okx"/>
+                                                            <outlet property="msgView" destination="o5P-Ba-cmY" id="hAb-pv-dEB"/>
+                                                            <outlet property="photoView" destination="Rqb-9f-Zoq" id="JRG-ed-wgX"/>
+                                                            <outlet property="statusLabel" destination="YQ5-ba-kO1" id="0Xu-ui-RrM"/>
+                                                        </connections>
+                                                    </tableCellView>
                                                 </prototypeCellViews>
                                             </tableColumn>
                                         </tableColumns>
@@ -192,7 +504,7 @@
                     <rect key="frame" x="0.0" y="0.0" width="798" height="50"/>
                     <subviews>
                         <textField verticalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bsk-Gj-qQ2">
-                            <rect key="frame" x="48" y="5" width="660" height="40"/>
+                            <rect key="frame" x="48" y="5" width="666" height="40"/>
                             <textFieldCell key="cell" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" placeholderString="Send a message" id="Ilz-7v-2fr" customClass="SendMessageCell">
                                 <font key="font" metaFont="system"/>
                                 <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
@@ -210,7 +522,7 @@
                                 <outlet property="delegate" destination="-2" id="2u2-D4-htz"/>
                             </connections>
                         </textField>
-                        <button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UJf-cF-RAo" customClass="HoverButton">
+                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UJf-cF-RAo" customClass="HoverButton">
                             <rect key="frame" x="714" y="5" width="40" height="40"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="40" id="TmF-ip-m4C"/>
@@ -230,15 +542,36 @@
                                 <binding destination="-2" name="enabled" keyPath="self.message.length" id="ZmZ-2N-CPX"/>
                             </connections>
                         </button>
+                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gwx-eT-PcN" customClass="HoverButton">
+                            <rect key="frame" x="756" y="5" width="40" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="C2W-wV-YvF"/>
+                                <constraint firstAttribute="width" constant="40" id="zZF-4P-pW9"/>
+                            </constraints>
+                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_file_upload" imagePosition="overlaps" alignment="center" enabled="NO" transparent="YES" imageScaling="proportionallyDown" inset="2" id="gfQ-c5-YPu">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="color" keyPath="imageColor">
+                                    <color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="sendFile:" target="-2" id="Lex-2X-KCU"/>
+                            </connections>
+                        </button>
                     </subviews>
                     <constraints>
+                        <constraint firstItem="gwx-eT-PcN" firstAttribute="centerY" secondItem="Rth-di-Tls" secondAttribute="centerY" id="773-Gg-YNe"/>
                         <constraint firstItem="UJf-cF-RAo" firstAttribute="leading" secondItem="bsk-Gj-qQ2" secondAttribute="trailing" constant="2" id="9A3-Gn-6zS"/>
                         <constraint firstAttribute="bottom" secondItem="bsk-Gj-qQ2" secondAttribute="bottom" constant="5" id="TID-Ww-Gmw"/>
-                        <constraint firstAttribute="trailing" secondItem="UJf-cF-RAo" secondAttribute="trailing" constant="50" id="XqO-dy-4yf"/>
                         <constraint firstItem="UJf-cF-RAo" firstAttribute="centerY" secondItem="Rth-di-Tls" secondAttribute="centerY" id="d73-0x-wSy"/>
+                        <constraint firstItem="gwx-eT-PcN" firstAttribute="leading" secondItem="UJf-cF-RAo" secondAttribute="trailing" constant="2" id="exX-kB-hcR"/>
                         <constraint firstAttribute="height" constant="50" id="jJO-v2-Wuj"/>
                         <constraint firstItem="bsk-Gj-qQ2" firstAttribute="top" secondItem="Rth-di-Tls" secondAttribute="top" constant="5" id="jJr-Dt-hhr"/>
                         <constraint firstItem="bsk-Gj-qQ2" firstAttribute="leading" secondItem="Rth-di-Tls" secondAttribute="leading" constant="50" id="khQ-CU-aUr"/>
+                        <constraint firstAttribute="trailing" secondItem="gwx-eT-PcN" secondAttribute="trailing" constant="2" id="ziq-OV-WVi"/>
                     </constraints>
                     <connections>
                         <outlet property="messageCell" destination="Ilz-7v-2fr" id="eOP-sJ-6Wf"/>
@@ -308,8 +641,11 @@
         </viewController>
     </objects>
     <resources>
+        <image name="ic_action_accept" width="72" height="72"/>
+        <image name="ic_action_cancel" width="72" height="72"/>
         <image name="ic_action_send" width="72" height="72"/>
         <image name="ic_action_video" width="72" height="72"/>
         <image name="ic_arrow_back" width="72" height="72"/>
+        <image name="ic_file_upload" width="72" height="72"/>
     </resources>
 </document>