First thing to do is to find the hook in the code and see what is going on around it. If you find that one, you'll see the next line is to output the template. It looks like the toolbar for the post, which is fed the message, is done before that hook (line 1071), so I'd guess you are trying to modify it too late.