While the people of Quba were performing the morning prayer, someone came to them and announced, "The Messenger of Allah ﷺ received revelation last night, and he has been commanded to face the Kaabah, so face it."Their faces had been toward Sham, and they turned around toward the Kaabah.
أخبرنا قتيبة عن مالك عن عبد الله بن دينار
بينما الناس بقباء في صلاة الصبح جاءهم آت فقال إن رسول الله ﷺ قد أنزل عليه الليلة قرآن وقد أمر أن يستقبل القبلة فاستقبلوها وكانت وجوههم إلى الشام فاستداروا إلى الكعبة