vocatwk / CodeU-Nemo

Chat web app for CodeU
Apache License 2.0
1 stars 3 forks source link

Fixed multiple bot instances #115

Closed lealgamb closed 6 years ago

lealgamb commented 6 years ago

To stop the Bot Revolution 🤖 , a bot will only be added to the UserStore if it has a unique UUID field. The way this is done is by using getUUIDFromBytes() by passing in the bytes of the bot's name. The check for unique Id's was added in UserStore. A test was also added for this.

Now that the bot classes are completed, I'll send a new PR with tests for NemoBot and ConversationStatBot, and update the tests for BotController if needed.

Fixes #113

lealgamb commented 6 years ago

Instead of hashing the Bot's names I got their names' bytes to take advantage of UUID's getUUIDFromBytes method.