When you are committed to someone, don’t chat with the opposite sex for no reason. No one is going to be nice to you for no reason or look out for you in every way. Chatting occasionally makes you friends; chatting every day means there’s something romantic going on. Not knowing how to say no is digging your own grave and giving someone else an opening. Don’t play dumb when you know better. You’re both adult, don’t pretend you don’t know what the other person wants.
Self-discipline matters more.