Respect the commitment you made to your partner.
You don’t necessarily need to reply to that message which is unrelated to work from a colleague of the opposite gender. You don’t necessarily need to accept an invitation for coffee if your partner feels uncomfortable about it.
Don’t argue that your partner has to trust you. Yes he/she needs to trust you. But how can you be sure that you will never end up falling for the wrong when you do these things? How can you be sure that you are 100% safe from the crazy temptations?
Never open the doors!