Ali delivered a sermon and said, "People, carry out the prescribed punishment on your slaves, both those who are married and those who are not. A slave girl belonging to the Messenger of Allah ﷺ committed fornication, and he ordered me to flog her. But she had only recently given birth, and I feared that if I flogged her I would kill her. So I mentioned this to the Prophet ﷺ, and he said, 'You did well.'"In another version he did not mention "both those who are married and those who are not," and added to the report the words, "Leave her until she recovers."
و حدثناه إسحق بن إبراهيم أخبرنا يحيى بن آدم حدثنا إسرائيل عن السدي بهذا الإسناد ولم يذكر من أحصن منهم ومن لم يحصن وزاد في الحديث اتركها حتى تماثل