That is the mainstream muslim version of of the treaty of Hudaibiyah.
There is another version
The Sunan of Abu Dawud in volume 2, #2759 says:
"....Thereafter some believing women who were immigrants came. (Allah sent down: O ye who believe when believing women come to you as emigrants). Allah most high forbade them to send them back, but ordered them to restore the dower."
Muhammad claimed that now God allowed him to break the Treaty, stating the conditions were only a test of the Muslim women's faith. Once again, Muhammad has a convenient "revelation" justifying his actions [see Sura 60:10]. Once again, Muhammad puts the responsibility on God's shoulders for his sin, i.e., allowing him to break his word.