you don't want to do this if the class has not changed.

At the start of the function you should save a boolean for `threadMessages.classList.contains('has-carrier')` and compare here