Sure, just copied from getMessages().