private void notifyFriendAboutInvitation(QBDialog dialog, Integer friendId) throws Exception {
   long time = DateUtilsCore.getCurrentTime();
   QBPrivateChat chat = chatService.getPrivateChatManager().getChat(friendId);
   if (chat == null) {
     chat = chatService.getPrivateChatManager().createChat(friendId, null);
   }
   QBChatMessage chatMessage = ChatUtils.createRoomNotificationMessage(context, dialog);
   chatMessage.setProperty(ChatUtils.PROPERTY_DATE_SENT, time + ConstsCore.EMPTY_STRING);
   chat.sendMessage(chatMessage);
 }
 private void notifyFriendOnUpdateChat(QBDialog dialog, Integer friendId)
     throws QBResponseException, XMPPException, SmackException.NotConnectedException {
   long time = DateUtilsCore.getCurrentTime();
   QBPrivateChat chat = chatService.getPrivateChatManager().getChat(friendId);
   if (chat == null) {
     chat = chatService.getPrivateChatManager().createChat(friendId, null);
   }
   QBChatMessage chatMessage = ChatUtils.createUpdateChatNotificationMessage(dialog);
   chatMessage.setProperty(ChatUtils.PROPERTY_DATE_SENT, time + ConstsCore.EMPTY_STRING);
   chat.sendMessage(chatMessage);
 }