If upvote as in re-ordering the posts in a topic by the number of votes they have gotten, that seemed like a big ask at first but thinking about it more, it should be possible to just re-organize the array of messages before it is passed onto the theme code. The only caveats I can think of off the top of my head would be that the first post would have to stay where it is always, and the posts would appear in their non-upvote-sorted form when doing things like split topic.