Skip to content
Snippets Groups Projects
Commit 4f4928b1 authored by Nicolai Søborg's avatar Nicolai Søborg Committed by Tulir Asokan
Browse files

Auth: redact message when already logged in

If FB is giving you a hard time while trying to authenticate, then you might mistakenly login while already being logged in, so move the `redact` command above  "already logged in" check
parent 6685028f
No related branches found
No related tags found
No related merge requests found
......@@ -59,13 +59,14 @@ async def login(evt: CommandEvent) -> None:
if len(evt.args) < 2:
await evt.reply("Usage: `$cmdprefix+sp login <email> <password>`")
return
elif evt.sender.client:
await evt.reply("You're already logged in")
return
email, password = evt.args[0], " ".join(evt.args[1:])
await evt.az.intent.redact(evt.room_id, evt.event_id)
if evt.sender.client:
await evt.reply("You're already logged in")
return
state = AndroidState()
state.generate(evt.sender.mxid)
api = AndroidAPI(state, log=evt.sender.log.getChild("login-api"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment