Open dninomiya opened 7 months ago
Based on the information you've provided and the context from the cal.com repository, it seems like the issue might be related to the handling of reservation notifications via Discord webhooks. While the cal.com codebase does support Discord webhook integration and has a function for sending a test ping to Discord, it's not clear if there's a specific function or method that handles sending reservation notifications to Discord via webhooks.
The mutation.mutate
method call with the parameters { url: subscriberUrl, secret: webhookSecret, type: "PING", payloadTemplate }
is responsible for sending the test ping to Discord. This is found within the onClick
event handler of the Button
component in the WebhookTestDisclosure
component. The mutation
object is created by calling trpc.viewer.webhook.testTrigger.useMutation()
. You can find this in the WebhookTestDisclosure.tsx file.
The SQL migration script indicates the addition of 'BOOKING_REQUESTED' and 'BOOKING_REJECTED' values to the "WebhookTriggerEvents" enum type. This suggests that the system is equipped to trigger webhook events for booking requests and rejections, which can be utilized to send notifications to various platforms, including Discord, by configuring webhooks accordingly. You can find this in the migration.sql file.
The function named createFunction
in the webhooks-view.tsx file is responsible for handling the creation and configuration of Discord webhooks. This function navigates the user to a new page for creating webhooks based on provided parameters.
Given this information, I would suggest checking the configuration of your webhook in Discord and in your cal.com settings. Make sure that the webhook URL and other settings match exactly. Also, ensure that the 'BOOKING_REQUESTED' and 'BOOKING_REJECTED' events are properly configured to trigger the webhook.
If the issue persists, it would be helpful to have more information about the specific steps you're taking when setting up the webhook and any error messages you're seeing. This will help in identifying if there's a bug in the codebase or if there's something specific to your setup causing the issue.
Discord webhook is not working.
The test ping is sent successfully, but I don't receive any notification of the actual reservation. Am I missing something?
Test ping is successful in this screenshot. However, you will not receive an actual reservation notification.
Thank you for your support!