While the people were performing the dawn prayer at Quba, a man came to them and said, "The Messenger of Allah ﷺ has had Quran revealed to him last night, and he has been commanded to face the Kaabah, so face it."The people had been facing Sham, so they turned their faces toward the Kaabah.
حدثنا خالد بن مخلد حدثنا سليمان حدثني عبد الله بن دينار
بينما الناس في الصبح بقباء جاءهم رجل فقال إن رسول الله ﷺ قد أنزل عليه الليلة قرآن وأمر أن يستقبل الكعبة ألا فاستقبلوها وكان وجه الناس إلى الشأم فاستداروا بوجوههم إلى الكعبة