Make an injectable "hrefToMessageId" function?