From the traps of Shayṭān – may the curse of Allāh ﷻ be upon him – that he sets for the progeny of Ādam, is that he entices them into being cheerful, pleasant, and welcoming with everyone without discriminating. Thus, he does not rebuke the religious innovators and those who contradict the Sunnah on the pretext of ‘good character’. This, no doubt, is deception from Shayṭān. Everything has its place; good character has its place and shunning people has its place. Thus, the people of religious innovation and immorality should be made to feel unwelcome and uncomfortable, and the people of good should be welcomed in a cheerful manner:

وَإِذَا جَاءَكَ الَّذِينَ يُؤْمِنُونَ بِآيَاتِنَا فَقُلْ سَلَامٌ عَلَيْكُمْ ۖ  كَتَبَ رَبُّكُمْ عَلَىٰ نَفْسِهِ الرَّحْمَةَ ۞
۞ أَنَّهُ مَنْ عَمِلَ مِنكُمْ سُوءًا بِجَهَالَةٍ ثُمَّ تَابَ مِن بَعْدِهِ وَأَصْلَحَ فَأَنَّهُ  غَفُورٌ رَّحِيمٌ

When those who believe in Our verses come to you, say: ‘Peace be upon you’ your Lord has taken it upon Himself to be merciful, so if any of you ignorantly commits an evil, and afterwards repents and corrects his ways, then surely He is Most-Forgiving, Most-Merciful. [Q 6: 54]

The people of good should be pleasantly welcomed due to their desire for righteousness. As for the evil people, they should be met with disdain until they repent to Allāh ﷻ. This is from the principle of rejecting evil, and actualising loyalty and disassociation for the sake of Allāh; loyalty to the people of good and disassociation from the people of evil.

As for those who bring about tribulation, then the Muslim should not be comfortable with them and should neither give them a platform nor opportunity to socialize. This is so as not to fall into tribulation due to them; especially if they engage in evil speech, like speaking ill about the people of good and describing them as harsh and extreme, and the likes of that. A Muslim should not sit with them,

وَإِذَا رَأَيْتَ الَّذِينَ يَخُوضُونَ فِي آيَاتِنَا فَأَعْرِضْ عَنْهُمْ حَتَّىٰ يَخُوضُوا فِي حَدِيثٍ غَيْرِهِ ۞
۞  وَإِمَّا يُنسِيَنَّكَ الشَّيْطَانُ فَلَا تَقْعُدْ بَعْدَ الذِّكْرَىٰ مَعَ الْقَوْمِ الظَّالِمِينَ

When you see people who verbally misrepresent and scorn Our verses, shun them until they move on to another topic; and if Shayṭān causes you to forget, then do not sit, after you have remembered, with people who are wrongdoers❞. [Q 6: 68]

The manner of interacting with each type of person varies according to what is befitting for each of them. He should set aside his good character for the good and righteous people; and set aside shunning for the evil people. A Muslim should not pleasantly welcome evil people and say: ‘this is from good character’ because this will cause them to become brazen about what they commit of evil-doing. If he does not change the manner of his encounters with them, they will become brazen and say: ‘there’s no disagreement between us, so-and-so welcomes us’. No! This is not permissible. Also, if people see him welcoming them, they will then feel comfortable with the evil-doers and use this as a proof. So it is a must to interact with people according to what is befitting for each of them.