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