The Prophet ﷺ said: He who forged in order to put things right between two persons did not lie. The version by Ahmad ibn Muhammad and Musaddad has: The liar is not the one who puts things right between people, saying what is good and increasing good.
أَنَّ النَّبِيَّ ﷺ قَالَ لَمْ يَكْذِبْ مَنْ نَمَى بَيْنَ اثْنَيْنِ لِيُصْلِحَ وَقَالَ أَحْمَدُ بْنُ مُحَمَّدٍ وَمُسَدَّدٌ لَيْسَ بِالْكَاذِبِ مَنْ أَصْلَحَ بَيْنَ النَّاسِ فَقَالَ خَيْرًا أَوْ نَمَى خَيْرًا