Ja'far bin Muhammad narrates from his father that he said: "When the news of the killing of the people of Bi'r Ma'unah reached the Prophet ﷺ, he stayed for fifteen nights; whenever he would raise his head from the last rak'ah in the morning prayer, he would say: 'Sami' Allahu liman hamidah, Rabbana lakal hamd' (then) 'O Allah! You do...'—he recited a long supplication, then he would say the takbir and go into prostration."
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 235