ogioncz / flarum-webhooks-telegram-bridge

Bridge between Flarum Webhooks extension and Telegram
MIT License
4 stars 1 forks source link

Plugin configured and without error, but it doesn't work #4

Open talesam opened 1 year ago

talesam commented 1 year ago

Hello, I made a default configuration and to have no error I even installed apache to run, it is running without errors, apparently, but the message does not arrive on telegram, when it is sent on the forum. Before, it was configured in another forum, Discourse, nothing was changed, I just put the configuration in the config.php file of your plugin, but it doesn't work, do you need to redo something in telegram to work?

jtojnar commented 1 year ago

Does the https://your-flarum-forum.com/flarum-webhooks-telegram-bridge/?action=test&token=your-random-string produce anything?

Do you meant that this bridge worked with Discourse in the past?

I only ever tested it with “FoF Webhooks” extension.

talesam commented 1 year ago

A blank page appears, nothing appears. How do I debug this?

Discourse has a plugin inside it to activate directly

<?php

return [
    'apiKey' => 'your-api-key',
    'botName' => 'your-bot-name',
    'chatId' => 'your-chat-id',
    'token' => 'your-random-string',
];

apiKey = string created in @botfather botName = "Now let's choose a username for your bot. It must end in bot. Like this, for example: TetrisBot or tetris_bot." chatId = How do you get this information? token = any string of characters

jtojnar commented 1 year ago

If you go to https://your-flarum-forum.com/flarum-webhooks-telegram-bridge/ without specifying any action, you should get an error:

https://github.com/ogioncz/flarum-webhooks-telegram-bridge/blob/b17c5e7c0689aeb8fba0f9da1ca05174fb27aecd/index.php#L87

Otherwise, something is wrong with your PHP or web server set-up.

The chatId can be obtained by following the instructions here: https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id/32572159#32572159 (linked from the second step of the installation instructions).

talesam commented 1 year ago

I managed to solve it, it worked, thank you very much!!