The direction of heat transfer always depends on which of the following?
Temperature of each body
Direction of heat flow depends only on the temperature of the bodies. It does not depends on the energy contained by the body.
Recall the experiment done with a jug and a container.