Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notification in Telegram #4650

Closed
bravery-only opened this issue Oct 21, 2022 · 17 comments
Closed

Add notification in Telegram #4650

bravery-only opened this issue Oct 21, 2022 · 17 comments

Comments

@bravery-only
Copy link

Is it possible to add this feature? It would be great to receive notifications in the Telegram bot

@Ylianst
Copy link
Owner

Ylianst commented Oct 21, 2022

I just researched doing notifications from MeshCentral into Telegram and indeed, there are libraries to do this. Looks very interesting. For example this one. So, this is not a feature currently, but seems like something I can do.

@Ylianst Ylianst self-assigned this Oct 21, 2022
@bravery-only
Copy link
Author

I just researched doing notifications from MeshCentral into Telegram and indeed, there are libraries to do this. Looks very interesting. For example this one. So, this is not a feature currently, but seems like something I can do.

Of course, the method of this example is in the form of a mobile number. But please add the API Key method that can receive the notification in the Telegram bot.

@Ylianst
Copy link
Owner

Ylianst commented Oct 22, 2022

I just did a first pass at enabling Telegram. I am currently using the phone method, I need to look API key. If you have any hints where I need to look, please let me know. I currently got MeshCentral sending messages from the server console, but working on adding support for users to be able to register their user handles.

@vithusel
Copy link

vithusel commented Oct 22, 2022

This requires the creation of a telegram bot. Not exactly what you want but it has references to creating and sending data to the bot. Seems like the logical way of sending messages. Instead of having to login to telegram as a user/number

https://levelup.gitconnected.com/six-easy-steps-to-create-a-telegram-bot-from-a-google-spreadsheet-b62008d2b81f

@Ylianst
Copy link
Owner

Ylianst commented Oct 22, 2022

So far, I made good progress on using messaging features and adding it as a authentication factor. I still have to work on getting Telegram setup with phone or bot.

MC2-Telegram1
MC2-Telegram2
MC2-Telegram3
MC2-Telegram4

@bravery-only
Copy link
Author

bravery-only commented Oct 22, 2022

I am very happy. You are great @Ylianst

@Ylianst
Copy link
Owner

Ylianst commented Oct 22, 2022

Just got the Telegram setup using the phone done in MeshCentral. Use "--setuptelegram" and it will run you thru the right steps. I got both user and bot login done.

MC2-Telegram5

Ylianst added a commit that referenced this issue Oct 23, 2022
@bravery-only
Copy link
Author

Is the notification of connecting and disconnecting the device also displayed in the Telegram bot? Or are you notified only for not logging in?

@bravery-only
Copy link
Author

I could not install it. I am using Windows Server. Can you give me more advice?

Telegram

@si458
Copy link
Collaborator

si458 commented Oct 23, 2022

I could not install it. I am using Windows Server. Can you give me more advice?

Telegram

It's only been pushed to github not released on npm yet
You have to wait for the next release

Ylianst added a commit that referenced this issue Oct 23, 2022
@Ylianst
Copy link
Owner

Ylianst commented Oct 23, 2022

@si458 As usual you beat me to it. Yes, I was just about to say the same thing. This was not released yet. However, I just released v1.0.86 that has this feature so you can update and give it a try. Once setup, MeshCentral will only send the same messages that are sent with SMS which is not a lot (Account verification, 2FA and admin sent messages). However, if it works, I will add the option to have more notifications (device connect/disconnect, help requests, etc).

I do want to add help requests to SMS anyway.

For the node node_modules/meshcentral --setuptelegram command, you need to run this in the MeshCentral folder, the one that had meshcentral-data and node_modules in it.

I am going to work on documenting this Telegram feature now.

@Ylianst
Copy link
Owner

Ylianst commented Oct 24, 2022

Just added documentation on how to get Telegram setup here.

@bravery-only
Copy link
Author

Telegram is blocked in our country!! Is it possible to add the proxy function to the source?
Thank you, @Ylianst

@Ylianst
Copy link
Owner

Ylianst commented Oct 27, 2022

You would need to be much more specific as to what you mean by "proxy function".

Note that I just added support for Discord, look here #4651. That will be in MeshCentral v1.0.91.

@bravery-only
Copy link
Author

You would need to be much more specific as to what you mean by "proxy function".

Note that I just added support for Discord, look here #4651. That will be in MeshCentral v1.0.91.

Thank you. Please add the agent disconnection and connection notification

@Ylianst
Copy link
Owner

Ylianst commented Nov 1, 2022

Just added Telegram proxy support, take a look at #4697 for details. This will be in MeshCentral v1.0.95.

@panenka
Copy link

panenka commented Nov 11, 2022

I got lost too. I have been made steps till Login As Bot, in step Login As User shows that Telegram is configured, but there is no Messaging section on any user. So I don't know how to use configured Telegram notification.

@si458 si458 closed this as completed Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants