Hi everyone,
I am developing a discourse feature like twitter where users post responses to challenges (a post like entity in my app) and then other users can comment, reply and like on other responses. I plan to send notifications to all users (parent thread) when user replies on a comment or likes a comment. I am using push notification for this.
I am successfully able to send the push notification, but I also want that notification to be sent to my BE server via a webhook once notification is delivered successfully. I have configured the webhook on push events and the send test works just fine. But when I try to send a actual push notification and the expect the webhook to be received on the endpoint, I don’t get any regardless the push notification being delivered successfully
class CustomerIOClient:
def __init__(self):
self.api_client = APIClient(settings.CUSTOMER_IO_APP_API_KEY)
def send_push_notification(
self,
email,
body,
link,
transactional_message_id="default_push_message",
):
"""
Send a push notification to all devices of a user identified by email
"""
try:
request = SendPushRequest(
transactional_message_id=transactional_message_id,
identifiers={"email": email},
message=body,
link=link,
)
response = self.api_client.send_push(request)
return response
except CustomerIOException as e:
logger.error(e)
logger.error("could not send notification")