Closed sapostolou closed 6 years ago
I replaced condition: '\'mytopic\' in topics'
with condition: '\'mytopic\' in topics || \'mytopic2\' in topics'
and it worked.
I did that because of this line in sender.js.
It will work for me anyway since I will always be using an actual condition but I think that it should be able to work without an actual logical AND or OR.
@taroutatsou Thanks for reporting this!
@hypesystem I think we should modify extractRecipient
to pass the type of recipient extracted to the callback and not just the recipient value here. That way we don't have to test the value for a regular expression at all, and we'd already know it's a PubSub topic notification.
What do you think?
The alternative is fixing the regex (which seems like a smaller change), but I don't really mind -- either solution is good :smile:
To be honest I don't think that the regex detection is a robust enough solution to begin with 🤕
Patching it up now will probably lead to more patching later.
@taroutatsou Would you like to submit a PR? 😄
Fixed via #312.
I'm trying to send a notification to a topic but I get the InvalidRegistration error.
This is the message's code:
and the sender's code:
I had no problem sending the following message through the HTTP API: