Open marutichintan opened 1 year ago
We already got a DB, what would be your use case for this?
we have to use polling for fetch messages from chat, webhook will decrease delay for new message.
I'm in the same boat as @marutichintan, it would be great to have a webhook that sends to a configure URL per session the jid and the message. Then in my app I can respond to that and not do pooling to fetch new messages.
Also: Is it possible to have another endpoint to clear/delete all the chats for a session? (so i make a cron to call that endpoint every night so it does not grow indefinetily)
i have already the added webhook using middleware of Prisma, i will create pull request as soon as possible.
Note: You cannot use unique webhook url for each session
On Thu, 2 Mar 2023 at 21:38, empresarrollo @.***> wrote:
I'm in the same boat as @marutichintan https://github.com/marutichintan, it would be great to have a webhook that sends to a configure URL per session the jid and the message. Then in my app I can respond to that and not do pooling to fetch new messages.
Also: Is it possible to have another endpoint to clear/delete all the chats for a session? (so i make a cron to call that endpoint every night so it does not grow indefinetily)
— Reply to this email directly, view it on GitHub https://github.com/ookamiiixd/baileys-api/issues/151#issuecomment-1452125270, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCUFHV25WFK7QJ4XLEXJIDW2DAYJANCNFSM6AAAAAAVA2IOBM . You are receiving this because you were mentioned.Message ID: @.***>
Please Add Webhook for incomming messages.