diff --git a/lib/ui.js b/lib/ui.js index 530a644..32072b8 100644 --- a/lib/ui.js +++ b/lib/ui.js @@ -228,7 +228,7 @@ module.exports = function(data){ data.screen.on('resize',function(){ for(i in data.msgBox){ item = data.msgBox[i] - item.height = data.screen.height - data.cmdline.height + item.height = data.screen.height - data.cmdline.height - 2 } data.chats.height = data.screen.height - data.cmdline.height data.screen.render() diff --git a/telecommander.js b/telecommander.js index f5d0aea..e61a42b 100755 --- a/telecommander.js +++ b/telecommander.js @@ -82,6 +82,7 @@ data.onPhoneCode = function(something,s){ if(((!name || !lastname) && !data.user.registered) || !code) return log('insufficient arguments:',cmd) // TODO: handle this better! var cb = function(result){ + data.user = data.user || {} data.user.id = ''+result.user.id data.user.phone = result.user.phone data.user.phoneCodeHash = result.phone_code_hash