What your friend is referring to is commonly called the "Golden hour" or the "Golden Window". It is also dependent on the type of exercise that you are doing.
Many studies have shown that for endurance exercisers that have a need to replace glycogen in both muscles and body storage, that sooner is better, as the body is primed to deliver glycogen to the muscles when it is ingested soon after the workout is finished. A 3:1 carbohydrate to protein ratio has also been identified as being ideal, which corresponds with the profile of chocolate milk. This window used to be thought of as 1-2 hours, but that has been changed to 15-30 minutes as being the best.
This was extrapolated by the supplement industry to blanketly include all exercise as needing refueling immediately after the workout, however this has not been borne out in studies as being more efficient. It can help recover some of the muscle glycogen, but the repair and results are not affected.