The account is that Bhai Joga Singh was summoned by Guru Gobind Singh Ji from Peshawar during his own wedding, left immediately, and on the journey stopped at Hoshiarpur where he was tempted and did not go through with it.
He arrived and found that the Guru had known.
The story is told as a warning about pride: it is the fact that he thought well of himself for coming that is the failure, not the temptation.
There are a set of these in the tradition, sakhis about Sikhs who did the right thing for the wrong reason, and they are told more often to adults than to children.
Gurdwara Bhai Joga Singh at Peshawar existed before 1947. Its condition is not documented.
The Sikh community of Peshawar was old, was Pashto-speaking, and largely left after 2009 rather than in 1947.
The sakhi is set at his own wedding. He was summoned, left, and on the road stopped at a place where he was tempted and was turned back from it by a stranger who was the Guru.
The point of the telling is that the resolve was not his. It is a story against self-congratulation, told in a tradition that produces a great many stories of extraordinary constancy.
Sakhis of this kind are the teaching literature of the tradition. They circulate orally and in cheap printed collections, their historical value is low, and history is not their function.