don't start tutorial after registration
This commit is contained in:
parent
caa5d31012
commit
bc0d00fd2b
@ -530,24 +530,3 @@ pub fn img_check(account: &Account) -> Result<Uuid, Error> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn tutorial(tx: &mut Transaction, account: &Account) -> Result<Option<Instance>, Error> {
|
||||
let query = "
|
||||
SELECT count(id)
|
||||
FROM players
|
||||
WHERE account = $1;
|
||||
";
|
||||
|
||||
let result = tx
|
||||
.query(query, &[&account.id])?;
|
||||
|
||||
let row = result.iter().next()
|
||||
.ok_or(format_err!("unable to fetch joined games account={:?}", account))?;
|
||||
|
||||
let count: i64 = row.get(0);
|
||||
|
||||
if count == 0 {
|
||||
return Ok(Some(instance_practice(tx, account)?));
|
||||
}
|
||||
|
||||
return Ok(None);
|
||||
}
|
||||
@ -128,10 +128,6 @@ impl User for Authenticated {
|
||||
let wheel = account::chat_wheel(&db, a.id)?;
|
||||
self.ws.send(RpcMessage::ChatWheel(wheel))?;
|
||||
|
||||
if let Some(instance) = account::tutorial(&mut tx, &a)? {
|
||||
self.ws.send(RpcMessage::InstanceState(instance))?;
|
||||
}
|
||||
|
||||
// tx should do nothing
|
||||
tx.commit()?;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user