Hacker News new | ask | show | jobs
Telegram Middleman Bot – Push Notifications as easy as POST (github.com)
65 points by n1try 3243 days ago
9 comments

I have not looked at this in detail, but I can't see what advantages this has over just sending a simple http request like this:

  https://api.telegram.com/botTOKEN/sendMessage?id=YOUR_ID&message="your servers are on fire"

because that's all you need as far as I know. Works via GET, POST, PUT, everything.

Only thing I could see is being able to switch it out for other services easier.

You're right, but you'd need your own specific Telegram-internal user id so that your message will only be routed to your specific chat. With my little piece of code, n people can register at 1 bot. Without it you would either have to figure out your user id first or have n separate bots for n people. Of course, the advantage is not too dramatic ;-) And yes, the ability to link the bot to further services than only Telegram is another plus.
You can get your own (or group's) chat ID with @get_id_bot, if you don't want to just get it yourself via `getUpdates`.
Telegram really deserves more attention than it gets. It has the largest feature set, best multi-platform support with true desktop clients, awesome/fast mobile apps and a large part of the code is open source. What's not to love? Just that none of my friends use it :/
I've been using Telegram for about a year now and after a long fought battle, I was able to get all my friends onto it.

Truly the best group-chat platform I have used. It works extremely fast, and feels more polished and focused than whatsapp.

Whatsapp has too much going on, the fact that they store images/videos on your phone, and when you switch to different client or a different device your chat history does not follow with you. (I know you can "backup" and then "import" chats, but I mean come on.. thats a lot of work, not to mention you miss out on messages sent in between the switch)

And the most impressive Telegram? The search! Oh man the search... I have no idea how Telegram can index and search hundreds of thousands of messages INSTANTLY and take me back to a conversation I had over a year ago without so much as a delay.

Pavel, CEO of Telegram must be burning through money, but I really do hope they last.

And while I know we are an endangered species, I have to say their support for Windows 10 mobile is top notch. I find their app is better than Whatsapp.

Too bad the network effect is a thing, and also their approach to crypto might put you off.

> approach to crypto might put you off

It doesn't, anymore than whatsapp. Whatsapp says they have end-end encryption. Has anyone verified it independently? They say they use Signal's tech. Has anybody verified that the app doesn't just take screenshots of the screen and send them to facebook for data mining? When your app is closed source, all claims about security and encryption are meaningless, unless some solid auditing is done.

Same could be said of Telegram. Plus, we know their encryption is not really that great because no real encryption expert will stand behind Telegram's encryption and Telegram says "Trust us" when it comes to the subject of their encryption.

Signal tech is open source, can be checked and has been checked. I am pretty sure that if Whatsapp was lying about using the Signal encryption libraries, word would have leaked out of Whatsapp by now. On top of that, I would trust Moxie 100 times more than I would of the owner of Telegram.

Plus, the idea that Whatsapp is taking screen shots and sending it to Facebook is pretty silly. It would be really simple for them to have the messages copied; one going to true receiver and one going to the Facebook servers. There is no need for elaborate spying by Whatsapp, it would be really simple for them to spy on you if they wanted to.

* I am not calling the owner of Telegram dishonest, but in the Moxie vs Pavel Durov debate, I am going with Moxie.

You are arguing that we should not blindly trust someone's assertion that a product is good. For WhatsApp we have to trust someone's assertion that things are implemented as they claim. For telegram the e2e stuff is at least open source and directly reviewable.

I don't trust either Moxie or Pavel. At least in one instance we can trust the code.

> You are arguing that we should not blindly trust someone's assertion that a product is good.

Then we both should be using Signal since all of Signal is open source. This is what I use.

> For WhatsApp we have to trust someone's assertion that things are implemented as they claim. For telegram the e2e stuff is at least open source and directly reviewable.

Telegram still has blobs that are not released with the source code, so there is still a bit of a block box related to Telegram.

As much as I am a fan of Telegram[0] I still have to admit that I guess the WhatsApp crypto is better.

[0]: my threat model sees Facebook and snooping kids as a bigger risk to me than NSA or FSB. It also says that if those guys come after me I've lost anyway.

>When your app is closed source, all claims about security and encryption are meaningless, unless some solid auditing is done.

That is not true, closed source does not mean you can't read the source code, last year (and i bet is still possible to do it today) i decompiled the apk into java source code, i remember i made it to confirm the telegram url block[1]. But the point is, if its possible to read the client source code, it should be possible to assure at least some level of security.

And yes, i always recommend whatsapp instead of telegram for family members because telegram doesn't have default e2e (i feel bad everytime i have to say this).

edit->for clarification, obviously i prefer to use a full open source end-to-end encrypted messenger

[1]http://www.androidpolice.com/2016/09/09/whatsapp-is-blocking...

Is there any limit to the number of messages stored in a telegram conversation? Many users report previous messages being deleted without a warning

http://telegramgeeks.com/2016/02/telegram-only-shows-us-the-...

The cut off seems to be a million messages, seems like enough to me
I've seen my father manually clear all his whatsapp chats at the end of the week. 1 million is definitely enough for everyone but somebody who's not using telegram for chat.
As far as I understand it you can't scroll back further than a million, so if you were using this for notifications, you wouldn't be able to see what your n-1,000,000th notification was. I could be misinterpreting, but if I'm right I still don't see it as much of a problem.
> And they require your little server-side script to include some SMTP library and connect to a mail server. That's too heavyweight just to get some short information.

Really? Building and deploying a bot made in an arbitrary language is less onerous than registering for a Gmail account to send mail reports through?

Perhaps it's just the author's sense of humour, but this didn't strike me as helpful at all. Notifications can be handy for some things, email for other things. Depends on the person. But it's not hard to set up an email account. That's partly why it's still around.

Shameless plug: I did something similar earlier this year[1]. But instead of running the bot locally, I run it on Google App Engine to provide an HTTPS API. I also have an Android app to call the API to forward Android notifications.

My motivation is a little bit different. I made this because Telegram has great Android Auto support, and also has an easy to use Bots API, so I can convert non-Android-Auto-compatible notifications into Android Auto notifications. I explained my motivation in detail in a blog post. [2]

[1] https://github.com/fishy/notifbot

[2] https://wang.yuxuan.org/blog/item/2017/03/smartthings-myq-an...

Why is setting up a bush notification system so difficult that it's easier to piggy back on telegram? I have a project I want to do that involves making your own PUSH server (for battery reasons). Would it be difficult to setup
I'd be interested in that project, can you show it?
I haven't made it. I've just started thinking about what I'd need to get it done. I'm a systems dev not an Android app person.

I want to make a thing that will forward my SMSs to a webpage so I can read them online and I want to be able to start conversation, reply to conversations, etc. I want it to be open source and free.

I'm not really interested in making it, I just want it.

IFTTT can do this for you without programming work. Requires your phone because texting requires money.
look at Pushbullet, as a browser extension.
This is not self hosted, open source, nor free.
It's funny to see such projects while one of the main reasons to built Telegram in the first place was to built something with a simple http api (vs. the non-http XMPP api) ;-)
Is there something like this for Facebook Messenger?
so...zapier?