[Machine] The Messenger of Allah ﷺ, when he came to the door of a people, would walk along the wall and not face the door. Instead, he would stand to the right and left and seek permission. If permission was granted, he would enter, and if not, he would turn back. This is because the people did not have curtains for their doors. This is the wording of the Hadith of Adam, and in another narration by Al-Harrani, he did not face the door directly, but rather from his right or left corner. He would say, "Peace be upon you." This is because the doors at that time did not have doorknobs.
كَانَ رَسُولُ اللهِ ﷺ إِذَا أَتَى بَابَ قَوْمٍ مَشَى مَعَ الْجِدَارِ وَلَمْ يَسْتَقْبِلِ الْبَابَ وَلَكِنْ يَقُومُ يَمِينًا وَشِمَالًا فَيَسْتَأْذِنُ فَإِنْ أُذِنَ لَهُ وَإِلَّا رَجَعَ وَذَلِكَ أَنَّ الْقَوْمَ لَمْ يَكُنْ لِأَبْوَابِهِمْ سُتُورٌ هَذَا لَفْظُ حَدِيثِ آدَمَ وَفِي رِوَايَةِ الْحَرَّانِيِّ لَمْ يَسْتَقْبِلِ الْبَابَ مِنْ تِلْقَاءِ وَجْهِهِ وَلَكِنْ مِنْ رُكْنِهِ الْأَيْمَنِ أَوِ الْأَيْسَرِ وَيَقُولُ السَّلَامُ عَلَيْكُمْ وَذَلِكَ أَنَّ الدُّورَ لَمْ يَكُنْ عَلَيْهَا يَوْمَئِذٍ سُتُورٌ