We used to speak during the prayer in the time of the Messenger of Allah ﷺ. One of us would address his companion about something he needed, until the verse was revealed, "Guard strictly the prayers" [Baqarah 2:238], and we were commanded to remain silent.
كنا لنتكلم في الصلاة على عهد رسول الله ﷺ، يكلم أحدنا صاحبه بحاجته حتى نزلت: {حفظوا على الصلوات} [ سورة البقرة: ٢٣٨] فأمرنا بالسكوت.
Bukhari narrated it in Amal fi Salah (1200) and in Tafsir (4534), and Muslim in Masajid (539), both through the route of Ismail bin Abu Khalid, from Harith bin Shubayl, from Abu Amr Shaybani, from Zayd bin Arqam, who related it.