code: function(id, key) {
        if (id) {
          if (key) {
            return when.promise((resolve, reject) => redis.hget(id, key, (err, result) => {
              if (err) {
                reject(err);
              } else {
                resolve(result);
              }
            })).then((res) => {
              const parsedRes = jsonParse(res)
                .catch(() => when(res));
              return parsedRes;
            });
          }
          return when.promise((resolve, reject) => redis.hgetall(id, (err, result) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          })).then((res) => {
            const resKeys = _.keys(res);
            return when.map(resKeys, (resKey) => {
              const parsedRes = jsonParse(res[resKey])
                .catch(() => when(res[resKey]));
              return parsedRes;
            });
          });
        }
        return when.reject(new Error('invalid args'));
      }
docs: Recall value of data stored by 'key'.
  
  This method is exposed as bot.recall(key);
  
  @function
  @param {String} id - Room/Conversation/Context ID
  @param {String} [key] - Key under id object (optional). If key is not passed, all keys for id are returned as an object.
  @returns {(Promise.<String>|Promise.<Number>|Promise.<Boolean>|Promise.<Array>|Promise.<Object>)}