I am not sure about it. I have just tested it for one time.

1. Create a user
2. This user will add admin as buddy in IM.
3. admin and the user will accept each other's request
4. Delete this user
5. Create the user with the same name again

After that, the user will have admin as his buddy without chat history.

I think it is not a serious bug. Anyone will confirm this on 5.0rc2?