code: function(threadId, messageContent) {
                  var message = formatDataToMakeMessage(threadId, messageContent);
  
                  /**
                   * Update Message on cache
                   */
                  if (canUseCache) {
                      if (db) {
                          try {
                              var tempData = {},
                                  salt = Utility.generateUUID();
                              tempData.id = parseInt(message.id);
                              tempData.owner = parseInt(userInfo.id);
                              tempData.threadId = parseInt(message.threadId);
                              tempData.time = message.time;
                              tempData.message = Utility.crypt(message.message, cacheSecret, salt);
                              tempData.data = Utility.crypt(JSON.stringify(unsetNotSeenDuration(message)), cacheSecret, salt);
                              tempData.salt = salt;
  
                              /**
                               * Insert Message into cache database
                               */
                              db.messages.put(tempData)
                                  .catch(function(error) {
                                      fireEvent('error', {
                                          code: error.code,
                                          message: error.message,
                                          error: error
                                      });
                                  });
                          }
                          catch (error) {
                              fireEvent('error', {
                                  code: error.code,
                                  message: error.message,
                                  error: error
                              });
                          }
                      }
                      else {
                          fireEvent('error', {
                              code: 6601,
                              message: CHAT_ERRORS[6601],
                              error: null
                          });
                      }
                  }
  
                  fireEvent('messageEvents', {
                      type: 'MESSAGE_EDIT',
                      result: {
                          message: message
                      }
                  });
              }
docs: *****************************************************
  P R I V A T E   M E T H O D S            *
  *****************************************************