Properly clear content after removing a friend or leaving a group