We always have the option to not participate in negativity or to find a way to create a positive direction instead.
Not everyone will respond to your cues, and there's no need to become overly attached to the idea of changing other people, because people have to choose for themselves how they will be in the world. Many people choose negativity because it is familiar to them and feels safe. It is important to give people the space to find their own way, but you can always set an example, subtly representing the power of being positive. At times you may interject an affirmative statement into the conversation, and at others you may simply change the subject. You may also simply withdraw your energy and presence, which also makes a subtle statement. If you feel comfortable enough with somebody that is always negative, perhaps you can have an honest conversation with them; after all, awareness is the first step to change.
A powerful way to free yourself from the negative pull is to enlist allies who are similarly minded. You and a friend, coworker, or family member may agree to work together to continually shift the energy in a situation in a positive direction. The power of two people working to promote the positive is exponentially greater than one person working on their own. As you and your allies work together to lift the energy around you, you will be amazed to see how quickly the positive pull begins to draw people into its orbit, freeing one mind after another from negativity into light.