Facebook and Uber don’t seem like obvious rivals, but that might change soon. A new patent reveals how Facebook could use its Events feature to siphon off some of Uber’s main business.

Facebook’s idea is actually pretty simple. When you RSVP for an event on the social network, a quick pop-up box would appear asking if you plan on driving. If you click “yes,” Facebook will let you list how many spots are open in your car, your route, how much you would charge a passenger, whether you’re willing to ride with strangers or just friends, and other relevant details. Then the site will connect you with other people going to the same event who need a ride.

The patent can even help out if you plan on using public transit. In that case, Facebook would send you a list of people going to the same event you can travel with, along with directions.

It’s a pretty clever idea, though we’re not sure whether the payment part is actually legal. After all, Uber rival Lyft has gotten into trouble in the past for letting unlicensed drivers give rides. But, other than that, we don’t see any issues with sharing a ride to our next event, especially if Facebook can make sure the driver is a friend or a friend of a friend.

Source USPTO