When Mecca was conquered for the Messenger of Allah ﷺ, he said, "Hold back your weapons." He then mentioned something similar to the hadith of Yahya and Yazid, in which he said, "Honor the alliances made in the days of ignorance, for Islam only increases them in strength. But do not contract new alliances under Islam."
حدثنا عبد الوهاب بن عطاء قال وحدثنا حسين المعلم
لما فتحت مكة على رسول الله ﷺ قال كفوا السلاح فذكر نحو حديث يحيى ويزيد وقال فيه وأوفوا بحلف الجاهلية فإن الإسلام لم يزده إلا شدة ولا تحدثوا حلفا في الإسلام