I've created a cloud function that listens to a pubsub topic. When deployed, this creates a subscription to the correct topic and functions how I would expect it to.
export const handler = functions.pubsub.topic("topicName").onPublish(( message, context ) => {
// code that runs
});
The deploy command used was:
firebase deploy --only functions
My question: How do I set a subscription filter for the topic, so that (for example) I only run the cloud function if an attribute is a specific value?
I know how to do this in the console by manually creating a subscription and create the filters on the subscription creation, but I can't find any documentation on how to do it in a Firebase cloud function.