You want to be helpful and lend an ear whenever a friend needs to vent about a frustrating experience. But complaining too much can make everyone focus on the negative. When your friend is winding down, ask them about good things that resulted from the situation to get them thinking positively.
Image from lalagerosotrance.
Make sure you frame your redirection of the chat as a question to give them the chance to think of positive outcomes rather than pointing things out for them. If they can’t come up with anything, ask them what they plan to do about the situation. Either way, you’ll have given them the chance to vent and helped them reflect on how to move forward.