[3.2][BETA] Telegram Notifications

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
lassik
Registered User
Posts: 12
Joined: Thu Jul 27, 2017 11:16 am

Re: [3.2][BETA] Telegram Notifications

Post by lassik » Fri Aug 04, 2017 12:43 pm

potku wrote:
Thu Aug 03, 2017 10:50 am
I should be at a point where that ID is the only thing missing. Is it the one with a negative sign in front of it (I read that for groups it's like that)?
Exactly :) Group IDs all seem to be negative numbers whereas individual user IDs (for one-to-one chat) are positive numbers.
potku wrote:
Thu Aug 03, 2017 10:50 am
the bot is not delivering messages to the group.
It sounds like you got the right chat ID for your group. And since you were able to see the ACP Telegram IDs panel and type in the chat ID, you must have unzipped the extension into the right folder and got it enabled.

Unfortunately the ext doesn't have any logging right now so it's hard to say what the problem is :(

One thing is that if PHP's cURL support is not enabled, it will not send any messages (since the whole thing is basically coded using cURL). But I can't find a way to check that from the phpBB UI.

You could also try using the Chat ID of your personal Telegram account instead of a group chat. That way the bot will try to send private messages to you instead of sending them to the group. Personal chat IDs are positive numbers, here's one way to find out yours: https://stackoverflow.com/a/32777943

It would be good to add better diagnostics/logging to the extension anyway, but unfortunately I can't personally devote a lot of time to developing this ext, so updates will take some time.

EDIT: One more thing - Telegram bot auth tokens look like this: a bunch of decimal digits, then a colon (a ":" mark), then a random-looking mix of small and capital letters as well as digits. Did you remember to include both the part before the colon and the part after?

lassik
Registered User
Posts: 12
Joined: Thu Jul 27, 2017 11:16 am

Re: [3.2][BETA] Telegram Notifications

Post by lassik » Tue Aug 15, 2017 9:47 am

Just released a new version 0.2.0. The download link in the first post now points to this version.

This version adds a 'Last error' display to the extension's ACP panel. Each time someone has posted, the extension records the outcome of sending the Telegram notification here. Normally it says 'Success'. If there was an error, the error message ought to be shown here.

@potku Since the ext didn't work for you, can you try installing this version and see what error message you get?

I'm still not parsing detailed error messages from the Telegram API but we can add that too if needed.

lassik
Registered User
Posts: 12
Joined: Thu Jul 27, 2017 11:16 am

Re: [3.2][BETA] Telegram Notifications

Post by lassik » Tue Aug 15, 2017 11:01 am

Just released a new version 0.3.0. The download link in the first post now points to this version.

Felt inspired so added the code right away to parse more detailed error messages from the Telegram API. Now they're pretty much as detailed as they can be.

Gubkin
Registered User
Posts: 7
Joined: Sun Sep 24, 2017 7:15 am
Location: RU
Name: Alexander
Contact:

Re: [3.2][BETA] Telegram Notifications

Post by Gubkin » Sun Sep 24, 2017 7:21 am

I can't remove data in ACP after turn off extension


have the error

Code: Select all

Fatal error: Uncaught phpbb\module\exception\module_exception: CANNOT_REMOVE_MODULE in /home/oilchoice/oilchoice.ru/docs/phpbb/module/module_manager.php:448 Stack trace: #0 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migration/tool/module.php(371): phpbb\module\module_manager->delete_module(465, 'acp') #1 [internal function]: phpbb\db\migration\tool\module->remove('acp', 32, 'ACP_TELEGRAM_NO...') #2 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migration/tool/module.php(405): call_user_func_array(Array, Array) #3 [internal function]: phpbb\db\migration\tool\module->reverse('add', 'acp', 'ACP_CAT_DOT_MOD...', 'ACP_TELEGRAM_NO...') #4 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migrator.php(711): call_user_func_array(Array, Array) #5 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migrator.php(658): phpbb\db\migrator->run_step(Array, NULL, false) #6 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migrator.php(551): phpbb\db\migrator->process_data_step(Array, Array) #7 /home/oilchoice/oilchoice.ru/docs/phpbb/db/migrator.php(514): phpbb\db\ in /home/oilchoice/oilchoice.ru/docs/phpbb/module/module_manager.php on line 448
have this on ver 0.3.0 and new 0.4.0

Orcajavi
Registered User
Posts: 5
Joined: Sun Jan 29, 2017 10:37 am

Re: [3.2][BETA] Telegram Notifications

Post by Orcajavi » Sun Sep 24, 2017 9:12 am

Great extension.
It would be nice to be able to choose which forums can be blocked to not receive notifications from them.

$ina
Registered User
Posts: 1
Joined: Fri Oct 06, 2017 3:27 pm

Re: [3.2][BETA] Telegram Notifications

Post by $ina » Fri Oct 06, 2017 3:31 pm

how to send topic Issue with pictures ?
this is only posted topic_title
thanx

lassik
Registered User
Posts: 12
Joined: Thu Jul 27, 2017 11:16 am

Re: [3.2][BETA] Telegram Notifications

Post by lassik » Wed Oct 11, 2017 9:36 pm

Gubkin wrote:
Sun Sep 24, 2017 7:21 am
I can't remove data in ACP after turn off extension

have this on ver 0.3.0 and new 0.4.0
Sorry to hear that you are having problems with it. Unfortunately, there seems to be some problem with the ACP migration code in 0.4.0 (from GitHub). That's why I removed the link to 0.4.0 from this forum and the download link in the first post in this thread still points to the old 0.3.0.

The issue in 0.4.0 is that it changes an ACP module by first removing it, then re-adding a changed version of it. (The purpose is to add a new page to the ACP.) This seems to confuse phpBB, in particular if you upgrade from 0.3.0 to 0.4.0 without disabling the ext in between :-( If someone wants to take a look at the migration code and spot what's wrong, it's here: https://github.com/lassik/phpbb-ext-tel ... _0_4_0.php I'm a little out of my depth here.
Orcajavi wrote:
Sun Sep 24, 2017 9:12 am
Great extension.
Thanks, it's nice to see that somebody else is also finding it useful :-)
Orcajavi wrote:
Sun Sep 24, 2017 9:12 am
It would be nice to be able to choose which forums can be blocked to not receive notifications from them.
That would be quite a big change to the ACP panel. I don't personally have time to do it but if somebody is experienced with ext coding and wants to add this, feel free to take a stab at it :-)
$ina wrote:
Fri Oct 06, 2017 3:31 pm
how to send topic Issue with pictures ?
this is only posted topic_title
That's true, I started as simply as possible. Do you mean the small picture (icon) next to the topic? Again I don't have time to add this but if somebody wants try, feel free :)

More generally, if somebody wants to help improve/maintain the code, help is welcome :)

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 23562
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] Telegram Notifications

Post by Paul » Thu Oct 12, 2017 5:33 am

You probably should make it two separate migrations, and define the correct depends on values
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: alex75, andares, deanmoke and 28 guests