عَنْ أَبِي هُرَيْرَةَ رضي الله عنه عَنْ رَسُولِ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِذَا لَقِيَ أَحَدُكُمْ أَخَاهُ فَلْيُسَلِّمْ عَلَيْهِ، فَإِنْ حَالَتْ بَيْنَهُمَا شَجَرَةٌ أَوْ جِدَارٌ أَوْ حَجَرٌ ثُمَّ لَقِيَهُ فَلْيُسَلِّمْ عَلَيْهِ أَيْضًا».
The Prophet (may Allah's peace and blessings be upon him) urges the Muslim to greet his fellow Muslim with peace whenever he meets him; even if they are walking together and something separates between them, like a tree, a wall, or a big rock, and then he meets him, he should greet him with peace once again.
Download for free and never miss a prayer again