-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bot.roomRegister does not set roomId #137
Comments
What version of ttapi do you use ? var repl = require('repl');
var Bot = require('ttapi');
var bot = new Bot('XXXX', 'XXXX');
repl.start('> ').context.bot = bot; Then... > bot.roomId
null
> bot.roomRegister('4e6851fa14169c2255108b8c')
undefined
> bot.roomId
'4e6851fa14169c2255108b8c'
> bot.roomDeregister()
undefined
> bot.roomId
null
> bot.roomRegister('4e6851fa14169c2255108b8c')
undefined
> bot.roomId
'4e6851fa14169c2255108b8c' Everything seems to work properly. The latest version is |
I was using 1.5.3 since last night. I checked it again and it still breaks :/ |
I have been having issues on my android version of TT the past few days switching between rooms. Maybe the problem isn't in the API, but with TT itself. |
Frick updated the API to fix the hole we found with sections. I wonder if the API call requires this now? |
This is an easy but somewhat urgent fix.
Calling bot.roomRegister does not set the bot's roomId. This causes problems if, for example, you need to call bot.roomInfo later. The bot sends a null, and gets an error code in return from Turntable.
I discovered this issue by calling the bot constructor without a room ID, then calling roomRegister thinking it would handle this for me. Luckily, bot.roomId is publically available to change, so I have a temporary fix by inserting this line
before the call to roomRegister
The text was updated successfully, but these errors were encountered: