FWIW, `getMessagesById` can be changed into an internal function, so a consumer doesn't have to worry about the variation.