Abdullah bin Umar reported,

When the Messenger of Allah ﷺ was at Taif, he said, "We will depart tomorrow, Allah willing."Some of the companions of the Messenger of Allah ﷺ said, "We will not leave until we conquer it."The Prophet ﷺ said, "Then go out to fight in the morning."So they went out the next morning and fought fiercely, suffering many wounds. The Messenger of Allah ﷺ then said, "We will depart tomorrow, Allah willing."This time they fell silent, and the Messenger of Allah ﷺ laughed.Humaydi said, Sufyan narrated to us the entire report.

Bukhari 6086

Sahih

حدثنا قتيبة بن سعيد حدثنا سفيان عن عمرو عن أبي العباس

عن ابن عمر قال

لما كان رسول الله ﷺ بالطائف قال إنا قافلون غدا إن شاء الله فقال ناس من أصحاب رسول الله ﷺ لا نبرح أو نفتحها فقال النبي ﷺ فاغدوا على القتال قال فغدوا فقاتلوهم قتالا شديدا وكثر فيهم الجراحات فقال رسول الله ﷺ إنا قافلون غدا إن شاء الله قال فسكتوا فضحك رسول الله ﷺ قال الحميدي حدثنا سفيان بالخبر كله

البخاري 6086صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Manners
Chapter
Smiling and laughing
Numbering
Darussalam 6086
Bukhari 6086