Commit 94095382 authored by Rocket_Chat's avatar Rocket_Chat

documentation

parent 9cd0ae75
......@@ -312,6 +312,8 @@ Copy **https://pitangui.amazon.com/api/skill/link/YOURVENDORID** or **https://la
### Setting up Local development
With this setup, develper can run the backend code of the skill in the system itself, leading to faster development.
Note: The below setups are optional and is not required for the code to run in aws lambda.
1. Navigate to `./lambda/custom` folder and make a new file named .env
......
......@@ -8,6 +8,9 @@ module.exports = {
awsAccessKeyId: process.env.ACCESS_KEY_ID,
awsSecretAccessKey: process.env.SECRET_ACCESS_KEY,
customLogUrl: process.env.CUSTOM_LOG_URL || "",
//the below configurations are used in resolve channelname and username helper functions
//the minimum rating which a name has to achieve to be considered as similar
lowerSimilarityIndex: 0.5,
//a name is considered as best match on passing the below index
upperSimilarityIndex: 0.7
};
......@@ -935,6 +935,7 @@ const resolveChannelname = async (channelName, headers, single = false) => {
}
}
//if best matching name has passed the upper similarity index or if the function is called to return only best matching result
if (bestIndex >= envVariables.upperSimilarityIndex || single) return [bestMatchingChannel]
return similarChannels
......@@ -985,6 +986,7 @@ const resolveUsername = async (username, headers, single = false) => {
}
}
//if best matching name has passed the upper similarity index or if the function is called to return only best matching result
if (bestIndex >= envVariables.upperSimilarityIndex || single) return [bestMatchingUser]
return similarUsers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment