users: send user and presence updates for deleted user

This commit is contained in:
Luna 2019-09-30 10:43:30 -03:00
parent 9c2e04a17c
commit 3e15f9a518
1 changed files with 10 additions and 0 deletions

View File

@ -571,4 +571,14 @@ async def delete_account():
await delete_user(user_id) await delete_user(user_id)
await user_disconnect(user_id) await user_disconnect(user_id)
# we dispatch both a USER_UPDATE and a PRESENCE_UPDATE
# just to keep proper state for all the users.
await mass_user_update(user_id)
await app.presence.dispatch_pres(user_id, {
'afk': False,
'status': 'offline',
'game': None,
'since': 0,
})
return '', 204 return '', 204