Yes I was in the middle of testing different options, sorry.  My real issue is figuring out how to detect the proper CSS gets set.  That's the only side effect of setting li.dataset.lastMessageType, otherwise I can't poke at it to test it.