cusdis icon indicating copy to clipboard operation
cusdis copied to clipboard

I get webhook notified only when I visit the self-hosted cusdis website

Open Beiluo-Wang opened this issue 2 years ago • 5 comments

I deployed a telegram bot to notify me of the new comments, which works well with the official cusdis.com. 

However, when I deployed a self-hosted cusdis on Vercel following the documentation, the webhook worked only when I visited the hosted website.

Beiluo-Wang avatar Feb 13 '22 06:02 Beiluo-Wang

Just tested, and noticed the same issue. Strange because I have the comment counter set up, and it logged the new comment (despite not displaying it), so it might be an issue on the bot's side?

candideu avatar Feb 14 '22 07:02 candideu

Just tested, and noticed the same issue. Strange because I have the comment counter set up, and it logged the new comment (despite not displaying it), so it might be an issue on the bot's side?

@candideu I find it's interesting that I can also get notification of the "old comment" when I submit a new one. It looks like adding a comment will trigger the webhook, but not with the most recent comment.

I guess a possible reason behind this is the webhook logic. I am not familiar with TypeScript programming. Can anyone check the code for that part?

Beiluo-Wang avatar Feb 15 '22 01:02 Beiluo-Wang

Is it your telegram bot also self host?

djyde avatar Feb 15 '22 13:02 djyde

Is it your telegram bot also self host?

@djyde Yes. I cannot get webhook from @CusdisBot. So I deployed a telegram bot myself: https://gist.github.com/Beiluo-Wang/b693e535d9772bfc2aea8c4bbe23bbe9

Beiluo-Wang avatar Feb 15 '22 13:02 Beiluo-Wang

Is it your telegram bot also self host?

Mine isn't, I'm using the hosted one.

candideu avatar Feb 15 '22 16:02 candideu