diff --git a/disabled/send-invitation-request-dialog.cpp b/disabled/send-invitation-request-dialog.cpp
new file mode 100644
index 0000000..8cc0640
--- /dev/null
+++ b/disabled/send-invitation-request-dialog.cpp
@@ -0,0 +1,99 @@
+#include "send-invitation-request-dialog.hpp"
+#include "ui_send-invitation-request-dialog.h"
+
+using namespace chronos;
+
+SendInvitationRequestDialog::SendInvitationRequestDialog(QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::SendInvitationRequestDialog),
+  m_stringListModel(new QStringListModel)
+{
+  ui->setupUi(this);
+  ui->contactsListView->setEditTriggers(ui->contactsListView->NoEditTriggers);
+  ui->contactsListView->setModel(m_stringListModel);
+
+  connect(ui->sendButton, SIGNAL(clicked()),
+          this, SLOT(onSendButtonClicked()));
+  connect(ui->cancelButton, SIGNAL(clicked()),
+          this, SLOT(onCancelButtonClicked()));
+  connect(ui->contactsListView, SIGNAL(clicked(QModelIndex)),
+          this, SLOT(onContactListViewClicked(QModelIndex)));
+  connect(ui->contactsListView,SIGNAL(doubleClicked(QModelIndex)),
+          this, SLOT(onContactListViewDoubleClicked(QModelIndex)));
+}
+
+SendInvitationRequestDialog::~SendInvitationRequestDialog()
+{
+  delete ui;
+}
+
+void
+SendInvitationRequestDialog::setContacts(const std::vector<ndn::Name>& contacts)
+{
+  QStringList contactsList;
+  for(int i = 0; i < contacts.size(); i++){
+    contactsList.append(QString::fromStdString(contacts[i].toUri()));
+  }
+  m_stringListModel->setStringList(contactsList);
+}
+
+void
+SendInvitationRequestDialog::onSendButtonClicked()
+{
+  if(ui->contactsListView->selectionModel()->selectedRows().size() == 0){
+    QMessageBox messageBox;
+    messageBox.addButton(QMessageBox::Ok);
+    messageBox.setIcon(QMessageBox::Information);
+    messageBox.setText("Please select a contact to send invitation request");
+    messageBox.exec();
+  }
+  else{
+    //send invitation request
+    int selectedRow = ui->contactsListView->selectionModel()->selectedRows()[0].row();
+    QString contactName = m_stringListModel->stringList()[selectedRow];
+    qDebug() << contactName;
+
+    QMessageBox messageBox;
+    messageBox.addButton(QMessageBox::Yes);
+    messageBox.addButton(QMessageBox::No);
+    messageBox.setIcon(QMessageBox::Question);
+    messageBox.setText("Send invitation request to "+ contactName +"?");
+
+    int selection = messageBox.exec();
+
+    if(selection == QMessageBox::Yes){
+      //send invitation request
+      //need to have another message box when successfully send
+      //emit sendInvitationRequest(m_chatroomName, contactName);
+    }
+  }
+}
+
+
+void
+SendInvitationRequestDialog::onCancelButtonClicked()
+{
+  //qDebug() << "cancel";
+  this->close();
+}
+
+void
+SendInvitationRequestDialog::onContactListViewClicked(QModelIndex modelIndex)
+{}
+
+void
+SendInvitationRequestDialog::onContactListViewDoubleClicked(QModelIndex modelIndex)
+{
+  onSendButtonClicked();
+}
+
+void
+SendInvitationRequestDialog::setChatroomName(const QString chatroomName)
+{
+  m_chatroomName = chatroomName;
+}
+
+
+#if WAF
+#include "send-invitation-request-dialog.moc"
+#endif
diff --git a/disabled/send-invitation-request-dialog.hpp b/disabled/send-invitation-request-dialog.hpp
new file mode 100644
index 0000000..ea86676
--- /dev/null
+++ b/disabled/send-invitation-request-dialog.hpp
@@ -0,0 +1,55 @@
+#ifndef SENDINVITATIONREQUESTDIALOG_H
+#define SENDINVITATIONREQUESTDIALOG_H
+
+#include <QDialog>
+#include <QStringListModel>
+#include <QMessageBox>
+#include <QDebug>
+#include <QAbstractItemView>
+
+#ifndef Q_MOC_RUN
+#include "chatroom-discovery.hpp"
+#endif
+
+namespace Ui {
+class SendInvitationRequestDialog;
+}
+
+namespace chronos {
+
+class SendInvitationRequestDialog : public QDialog
+{
+  Q_OBJECT
+
+public:
+  explicit SendInvitationRequestDialog(QWidget *parent = 0);
+  ~SendInvitationRequestDialog();
+
+  void
+  setContacts(const std::vector<ndn::Name>& contacts);
+
+  void
+  setChatroomName(const QString chatroomName);
+
+public slots:
+  void
+  onSendButtonClicked();
+
+  void
+  onCancelButtonClicked();
+
+  void
+  onContactListViewClicked(QModelIndex modelIndex);
+
+  void
+  onContactListViewDoubleClicked(QModelIndex modelIndex);
+
+private:
+  Ui::SendInvitationRequestDialog *ui;
+  QString m_chatroomName;
+  QStringListModel *m_stringListModel;
+};
+
+} //namespace chronos
+
+#endif // SENDINVITATIONREQUESTDIALOG_H
diff --git a/disabled/send-invitation-request-dialog.ui b/disabled/send-invitation-request-dialog.ui
new file mode 100644
index 0000000..1108478
--- /dev/null
+++ b/disabled/send-invitation-request-dialog.ui
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SendInvitationRequestDialog</class>
+ <widget class="QDialog" name="SendInvitationRequestDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>441</width>
+    <height>308</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="introLabel">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>20</y>
+     <width>391</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Choose your contact to send invitation request:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+  </widget>
+  <widget class="QListView" name="contactsListView">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>50</y>
+     <width>351</width>
+     <height>192</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="sendButton">
+   <property name="geometry">
+    <rect>
+     <x>230</x>
+     <y>260</y>
+     <width>91</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Send</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="cancelButton">
+   <property name="geometry">
+    <rect>
+     <x>330</x>
+     <y>260</y>
+     <width>91</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Cancel</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
