All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
This story was related in full by Abu Nu’aym Al-Asbahaani in Ma’rifat As-Sahaabah, it was also mentioned by As-Suyooti in Al-Laali’ Al-Masnoo’ah fee Al-Ahaadeeth Al-Mawdhoo’ah, and it was mentioned by Ibn 'Arraaq in Tanzeeh Ash-Sharee’ah Al-Marfoo’ ‘an Al-Ahaadeeth Ash-Shanee’ah Al-Mawdhoo’ah"; and he ruled the story to be weak.
Also, Ibn Hajar quoted it in Al-Isaabah fi Tamyeez As-Sahaabah; then he said, “Ibn Mandah said after he narrated it briefly, Mansoor was the only one who narrated it.' I say, 'He is weak, and his Shaykh is even weaker than him. The context indicates the weakness of this information because the revelation of the verse {Your Lord has not taken leave of you [O Muhammad] nor has He detested [you].} [Quran 93:3] was before the migration without any difference of opinion.'”
So the story is either weak or fabricated.
Allaah knows best.