We need to distinguish between the thought and the will. Understanding this difference is what eventually ended my scrupulosity last year. Christ says that it is not what enters a person that defiles him, but what comes from within. Seeing a dirty image or thinking a dirty thought is not sinful in and of themselves, unless you intentionally searched up pornography or entertained impure thoughts on purpose (especially for the purpose of arousal). It seems here, however, that your friends are sending you this kind of content, and you’re having trouble getting it out of your mind.
We do not have full control over our thoughts. What enters us (here, this sexual content) does not defile us; what comes from within (i.e. our reaction to the stimulus / suggestion) is what determines whether we have sinned. If a dirty image or thought occurs to me, or if I accidentally see a disgusting image someone texted to me, I have two options:
- Think “Hey, I like this, so I’ll stay here and feast on these thoughts and images!”
- Walk away, distract myself, and try to forget about it.
Only #1 constitutes sin. #2 can be difficult if it takes a long time to get something out of your head. But your will must not consent.
As to your situation, please tell your friends you do not want this content sent to you and for them to at least respect the Catholic faith — even if they don’t agree, it’s just common decency to be respectful at the very least. If they continue to do so, block them or something on your phone. However, if you ever DO accidentally see this kind of material, remember the reasoning above.
One more thing: if you’re not sure you gave consent, then give yourself the benefit of the doubt and assume that you did not. A man witnessing a murder doesn’t doubt whether he consented to that murder.