Hi dear, yes H. pylori is transmitted through saliva but not by the way you were exposed to it. None of us is also sure whether your friends are positive for it or not.
Next Steps
Don't worry over it much as worrying will cause you more problems. Stay relaxed n continue eating healthy too.
Health Tips
While attending gatherings, do maintain social distancing and wear masks whenever possible. Follow proper hygiene practices too.