Closed slvnperron closed 7 years ago
Maybe use the file name as a namespace so there's a little chance of duplicated keys.
For example if we call
event.reply('#greetings.welcome')
it will reply with the content of welcome key inside greetings.yml
Would love to do a pull request if you tell me which things to modify, etc.
@blazeu Wonderful idea, love it!
Here's the main thing to modify: https://github.com/botpress/botpress/blob/master/src/umm/index.js#L79
Let me know if you need help, thanks for your help!
There's this UMM API in https://github.com/botpress/botpress/blob/master/src/server/secured.js#L172-L204
And also botpress/botpress#163
How should I handle that?
For now let's leave out the API/UI, I think the only methods that need to change are getDocument() and saveDocument()
If
content.yml
is not present, we should look for acontent
folder and load all.yml
files inside that folder as content and aggregate them together.It should check for duplicated keys and throw if any is found upon bot start.