Umar (Allah be pleased with him) asked Allah's Apostle ﷺ about it and he commanded him that he should take her back until she is divorced in the state of purity without having a sexual intercourse with her, and said: Divorce her in the beginning of her 'Idda or her 'Idda commences.
وَقَالَ فِي الْحَدِيثِ فَسَأَلَ عُمَرُ النَّبِيَّ ﷺ عَنْ ذَلِكَ فَأَمَرَهُ أَنْ يُرَاجِعَهَا حَتَّى يُطَلِّقَهَا طَاهِرًا مِنْ غَيْرِ جِمَاعٍ وَقَالَ يُطَلِّقُهَا فِي قُبُلِ عِدَّتِهَا