The Messenger of Allah ﷺ was praying one night in his chamber when some of his companions came and joined him in prayer. He shortened the prayer, then entered the house, then came out again. He did this several times, each time praying and then withdrawing.When morning came, they said, "Messenger of Allah, we prayed with you last night, and we would have loved for you to lengthen your prayer."He replied, "I knew you were there, and I did that on purpose."
حدثنا يزيد أنبأنا حميد
أن رسول الله ﷺ كان ذات ليلة يصلي في حجرته فجاء أناس من أصحابه فصلوا بصلاته فخفف ثم دخل البيت ثم خرج ففعل ذلك مرارا كل ذلك يصلي وينصرف فلما أصبح قالوا يا رسول الله صلينا معك البارحة ونحن نحب أن تمد في صلاتك فقال قد علمت بمكانكم وعمدا فعلت ذلك