We used to speak during the prayer behind the Messenger of Allah ﷺ, a man would talk to his companion beside him, until the verse was revealed, "And stand before Allah devoutly obedient" [Baqarah 2:238]. We were then commanded to remain silent and forbidden from speaking.
حدثنا أحمد بن منيع حدثنا هشيم أخبرنا إسمعيل بن أبي خالد عن الحارث بن شبيل عن أبي عمرو الشيباني
كنا نتكلم خلف رسول الله ﷺ في الصلاة يكلم الرجل منا صاحبه إلى جنبه حتى نزلت {وقوموا لله قانتين} فأمرنا بالسكوت ونهينا عن الكلام
Agreed upon. Muslim also reported it in "The Book of Mosques," chapter "The Prohibition of Speaking during Prayer... etc.," no. 539, from the hadith of Hushaym, and Bukhari, no. 1200, from the hadith of Ismail bin Abu Khalid, from Abu Khalid, through him.On this subject there is also a report from Ibn Masud [Bukhari, no. 1199, and Muslim, no. 538] and from Muawiya bin Hakam [Muslim, no. 537].