[Machine] We prayed one night in the clouds, and the direction of prayer was hidden from us. We were taught a sign, and when we finished, we looked and realized that we had prayed towards a different direction. We then informed the Messenger of Allah ﷺ about this, and he said, "You have done well, and we were not commanded to repeat it." This was narrated by Muhammad bin Salim from Ata and from Abd Malik al-Arzami from Ata. As for the narration of Muhammad bin Salim from Ata, it has already been mentioned, and as for the narration of Abd Malik, it is found in the collection of Ahmad bin Ubaydullah bin al-Hasan al-Anbari from his father.
صَلَّيْنَا لَيْلَةً فِي غَيْمٍ وَخَفِيَتْ عَلَيْنَا الْقِبْلَةُ وَعَلَّمْنَا عَلَمًا فَلَمَّا انْصَرَفْنَا نَظَرْنَا فَإِذَا نَحْنُ قَدْ صَلَّيْنَا إِلَى غَيْرِ الْقِبْلَةِ فَذَكَرْنَا ذَلِكَ لِرَسُولِ اللهِ ﷺ فَقَالَ قَدْ أَحْسَنْتُمْ وَلَمْ يَأْمُرْنَا أَنْ نُعِيدَ وَكَذَلِكَ رُوِيَ عَنْ مُحَمَّدِ بْنِ سَالِمٍ عَنْ عَطَاءٍ وَعَنْ عَبْدِ الْمَلِكِ الْعَرْزَمِيِّ عَنْ عَطَاءٍ أَمَّا حَدِيثُ مُحَمَّدِ بْنِ سَالِمٍ عَنْ عَطَاءٍ فَقَدْ مَضَى وَأَمَّا حَدِيثُ عَبْدِ الْمَلِكِ فَإِنَّهُ فِي وِجَادَاتِ أَحْمَدَ بْنِ عُبَيْدِ اللهِ بْنِ الْحَسَنِ الْعَنْبَرِيِّ عَنْ أَبِيهِ