Narrated Abu Huraira: Allah's Apostle said, "Whoever believes in Allah and the Last Day should talk what is good or keep quiet, and whoever believes in Allah and the Last Day should not hurt (or insult) his neighbor..." Sahih Bukhari: Volume 8, Book 76, Number 482.
What shall we do if we are in a situation where others are backbiting? We have to first remember Allah, and have them do so as well by advising them nicely. If this does not work, we must leave, because sitting there and listening is as bad as doing the deed. For the scholars agree that a person who is in attendance when a sin is being committed is as guilty as the ones who are committing the sin. Your presence is a kind of approval of the deed. If your friends are angry with you for not participating in their sins, they are not really friends. Why would they want to harm you? Your deen? or hurt your chances to get to Paradise? Also, remember in doing so, you are protecting the honor of your brother or sister, and look to the reward of doing so:
O Allah! Guard our tongues.
O Allah! Guard our actions.
O Allah! Forgive us our sins against You and ease the hearts of those we have harmed so that they too will forgive us.