Messenger of Allah, tell me about the person who found a man with his wife. The remaining part of the hadith is the same (but) with this addition: They invoked curses in the mosque and I was present there. And he narrated in the hadith: He divorced her with three pronouncements before Messenger of Allah ﷺ commanded him (to get separation). He separated from her in the presence of Allah's Apostle ﷺ, whereupon he said: There is a separation between the invokers of curses.
أَنَّ رَجُلاً مِنَ الأَنْصَارِ جَاءَ إِلَى النَّبِيِّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ أَرَأَيْتَ رَجُلاً وَجَدَ مَعَ امْرَأَتِهِ رَجُلاً وَذَكَرَ الْحَدِيثَ بِقِصَّتِهِ وَزَادَ فِيهِ فَتَلاَعَنَا فِي الْمَسْجِدِ وَأَنَا شَاهِدٌ وَقَالَ فِي الْحَدِيثِ فَطَلَّقَهَا ثَلاَثًا قَبْلَ أَنْ يَأْمُرَهُ رَسُولُ اللَّهِ ﷺ فَفَارَقَهَا عِنْدَ النَّبِيِّ ﷺ فَقَالَ النَّبِيُّ ﷺ ذَاكُمُ التَّفْرِيقُ بَيْنَ كُلِّ مُتَلاَعِنَيْنِ