It depends on a number of factors, including how you saw the messages the female friend sent and received and the closeness of your friendships with these people. For example, did your friend share the text messages with you? Were the text messages seen accidentally or inadvertently? If so, does your friend know you saw the messages? Was there any violation of personal privacy? (From your report, I assume the answer to this last question is, in your case, “No”; but mention it because it is a possible means by which some people find out about the moral failures of others and it may need to be considered as a factor by those people.) The other factor is whether you are close enough to these people to influence their actions or close enough to the injured party (the married friend’s spouse) to be considered a credible witness. Only after weighing the circumstances and your ability to do something constructive can you determine what should be done. If you have difficulty in your deliberations, I recommend discussing the situation with a confessor or spiritual director whose balance and orthodoxy you trust.