Fix stale own account info when switching accounts

This commit is contained in:
Jason McBrayer 2019-06-20 16:41:20 -04:00
parent 7c3b1106d1
commit cae6a1d2c5

View File

@ -251,9 +251,11 @@ def switch_accounts(request, new_account):
return False
except Account.DoesNotExist:
return False
request.session["active_user"] = accounts_dict[new_account]["user"]
request.session["active_username"] = account.username
request.session["active_instance"] = account.client.api_base_id
account, mastodon = get_usercontext(request)
request.session["active_user"] = mastodon.account_verify_credentials()
return True