All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Sodomy and adultery are two of the gravest major sins and the worst evil deeds. Whoever has committed either of them must repent to Allaah and ask Him for forgiveness.
Doing righteous deeds after one's repentance proves sincerity in repentance and is a signed for its acceptance by Allaah The Almighty. Indeed a person should not allow his previous evil deeds to prevent him from giving Da‘wah, encouraging good and forbidding evil. Even if he still commits acts of disobedience, he should still encourage good and forbid evil. Indeed this is even more worthy after a person has repented to Allaah and became a righteous Muslim.
We say to our brother that giving Da‘wah in the way of Allaah is one of the greatest righteous deeds because its benefits extend to others.
Allaah Knows best.