If I am in a WhatsApp group where sinful things are written sometimes, am I considered as someone who sits with sinners if I close WhatsApp, put my mobile in flight mode, and do not chat with them until they chat about lawful things?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
If you happened to see a sinful chat, then you should forbid the chatters from committing that sin. Forbidding evil is an obligation upon the person who knows of it. As long as you know that this evil took place, then it is not sufficient to put your phone in the flight mode and ignore the obligation of forbidding evil. Rather, you should forbid this sin that you came to know of, whether it be on this WhatsApp group or anywhere else, in a kind and gentle manner while trying to spread good things and warn of evil in the groups you are in. If you forbade them from this evil and explained the unlawfulness of those words to them but they did not respond to you, then do not join them in that chat until they change the subject. You clear yourself of your liability by forbidding evil. If they engaged in lawful chats, then you may join them in this case.
Allah knows best.
You can search for fatwa through many choices